[VB] Using WINSOCK

Started by
2 comments, last by Evil Steve 15 years, 4 months ago
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.
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]
Patrick
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!
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.

This topic is closed to new replies.

Advertisement