Can anyone help me with this question:
can a winsock client application connects to its server which is not within the same local network?
Printable View
Can anyone help me with this question:
can a winsock client application connects to its server which is not within the same local network?
Yes, Winsock works over WAN(the Internets).
Firewalls, NATs, etc....
You have to ensure ports are being forwarded from the external gateway(typically a router/modem) in order to receive incoming connections. One easy way is to set your local IP to the DMZ, and this will forward all traffic to your local IP.
A local IP is just that(like 192.168.0.*, or 10.0.0.*...), then a router or NAT is responsible for routing traffic from your WAN IP to your local adapters.
Here's a small program I wrote which allows you and a friend to establish a little shared virtual white board, where you can both draw whatever you like.
Sure, I'll PM you my IP, if you like, just drop me a message when you're ready.
I release it to the public domain, without license. Enjoy.