Click here to Skip to main content
15,895,011 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

So I made a small server-client application. After solving a lot of issues trying making it (being newbie in tcp) and finally building it, I wasn't done yet :-\

My question is, what IP do I use to connect to the server?

As I was testing it, I was using the internal IP 192.168.2.x within the same program, and everything was working. When I finally tried it between different devices it didn't work. I tried the server's external IP (got it from whatismyip.com) and nothing. Then tried the internal one but access was denied (I allowed access from the windows firewall for the application).

The port I'm using is 3724 if that makes any difference.

So what should I use?
Thanks
Posted

1 solution

I'm not sure I'm fully correct about this stuff, but I'll give it a try.

The external IP may be to your router. You would need to setup your router to forward traffic for a certain port (e.g., 3724) to your server. Then when you connect you need to specify that port.

You must do this because how else would the right computer be found if you are behind a router and several computers are on the network?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900