Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MFC AND CSOCKET, two ip address!

Status
Not open for further replies.

amirraminfar

Programmer
Jan 8, 2004
1
US
Ok so basically i have a game one being the server and one being the client. I accept and connect just fine from my computer but because I am using a router I have two IP addresses. One being 192.168.... and one 207.115... So I can connect and accept just fine using the 192.168... IP address from with in my LAN. But if I want some one to connect from outside of my LAN, it DOES NOT work. I am guessing because i am not binding to my real IP address.
I tried doing Create(7777,...,...., "207.115..."); but that did not work?
Any ideas on how I can bind with my real IP address. Or how I can fix so people from the internet can connect?

 
I think it is because your computer has a local IP address.

Ion Filipski
1c.bmp
 
Make sure your router is forwarding the port to your server.
Ex. If your program uses port 7777 to connect, forward that port on your router to the ip address of you server.

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top