• Advertisement
Sign in to follow this  

[VB] Using WINSOCK

This topic is 3410 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi there. I don't currently know how to connect another PC, that doesn' belong to my NETWORK. That is, connect to a public IP through WINSOCK, but WINSOCK is used only to make Client-Server applications where SERVER and CLIENT are both located in the same NETWORK. Summarising, how do I connect a Client that belong to another PUBLIC IP through WINSOCK? Thank you very much. Good bye for now.

Share this post


Link to post
Share on other sites
Advertisement
You should only need to pass the other machines IP and the port number it's listening for new connections on to the Connect() method. The problem you're experiencing connecting could be do to a router not configured to allow incoming connections

[Edited by - prh99 on December 22, 2008 9:48:46 PM]

Share this post


Link to post
Share on other sites
So, if the PC's public IP I am attemping to connect to were 1.1.1.1 (for instance), would I have to write in my Client's winsock IP property "1.1.1.1"? And now, open a port? What way should I open that port? Through WINSOCK or through MODEM/ROUTER configurations?

Thanks!

Share this post


Link to post
Share on other sites
Quote:
Original post by darkcube
So, if the PC's public IP I am attemping to connect to were 1.1.1.1 (for instance), would I have to write in my Client's winsock IP property "1.1.1.1"? And now, open a port? What way should I open that port? Through WINSOCK or through MODEM/ROUTER configurations?

Thanks!
The port needs to be opened on the router. When you connect to that IP address, you're connecting to that users router. If their router doesn't know where it should send traffic on that port, it'll just ignore it and you won't be able to connect.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement