Sign in to follow this  
barakat

localhost winsock !!

Recommended Posts

i was writing my own simple winsock server which worked very nice when i was telnetting it from the localhost but when i am connected to the internet and i asked my friends to telnet me at the port i am listening too ... they just cant connect to me ,,,, everytime the connection fails although it is successfful on the localhost ... i am on winXP with zonealarm as a firewall ....

Share this post


Link to post
Share on other sites
If you're using a port < 1024, it might be your ISP, they usually don't like people running servers. You might also be behind a NAT of somekind, in which case you'd need to set up port forwarding. Lastly, it might also be the address you're binding to. If you used the address of 127.0.0.1, obviously nobody from the outside work will be able to connect to it.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
By setting the sin_addr.s_addr member of the sockaddr_in structure to 0 before you call bind. That's the easiest way, as it will bind to all interfaces.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this