Socket behind FireWall
-
I like to connect to a certain port of server on Internet. For this purpose my application uses the well known function of WinSock API, connect() having prototype : int connect( SOCKET s, const struct sockaddr FAR *name, int namelen ); But, before i use this function, i have to populate "struct sockaddr" about the port and address of server. right !! Suppose, my client application is running on a machine behind a firewall eg SOCKS. Then please tell me how can i connect to server under this condition. I shall be thankful if you explain me clearly or write some example pseudocode. There is an example present at CP, but it is not too good to understand and it uses MFC Socket Classes.
-
I like to connect to a certain port of server on Internet. For this purpose my application uses the well known function of WinSock API, connect() having prototype : int connect( SOCKET s, const struct sockaddr FAR *name, int namelen ); But, before i use this function, i have to populate "struct sockaddr" about the port and address of server. right !! Suppose, my client application is running on a machine behind a firewall eg SOCKS. Then please tell me how can i connect to server under this condition. I shall be thankful if you explain me clearly or write some example pseudocode. There is an example present at CP, but it is not too good to understand and it uses MFC Socket Classes.
http://www.codeproject.com/useritems/winsockintro02.asp
Author of the romantic comedy Summer Love and Some more Cricket [New Win]
-
I like to connect to a certain port of server on Internet. For this purpose my application uses the well known function of WinSock API, connect() having prototype : int connect( SOCKET s, const struct sockaddr FAR *name, int namelen ); But, before i use this function, i have to populate "struct sockaddr" about the port and address of server. right !! Suppose, my client application is running on a machine behind a firewall eg SOCKS. Then please tell me how can i connect to server under this condition. I shall be thankful if you explain me clearly or write some example pseudocode. There is an example present at CP, but it is not too good to understand and it uses MFC Socket Classes.
-
http://www.codeproject.com/useritems/winsockintro02.asp
Author of the romantic comedy Summer Love and Some more Cricket [New Win]
Sorry Nish, yo didn't get my question I know very well how to connect to server. What i want to ask is that if firewall present at client side then how can we connect to server.
-
I like to connect to a certain port of server on Internet. For this purpose my application uses the well known function of WinSock API, connect() having prototype : int connect( SOCKET s, const struct sockaddr FAR *name, int namelen ); But, before i use this function, i have to populate "struct sockaddr" about the port and address of server. right !! Suppose, my client application is running on a machine behind a firewall eg SOCKS. Then please tell me how can i connect to server under this condition. I shall be thankful if you explain me clearly or write some example pseudocode. There is an example present at CP, but it is not too good to understand and it uses MFC Socket Classes.
Grab yourself a copy of Privoxy and have a look inside gateway.c.