WinSock over the Internet
Hello,
I''m trying to connect two computers over the Internet.
When I try to send data using the ip address found in each computer when i type ''ipconfig'' in the console, they do not connect with each other.
Or when I try the ip address returned at: whatismyip.com, they still do not connect with each other.
What is the problem here? the code works over the LAN though.
Help!
more details!
are you behind a firewall, does just sending data not work or also the connect,....
are you behind a firewall, does just sending data not work or also the connect,....
http://mitglied.lycos.de/lousyphreak/
Hello.
We tried running the codes without firewalls. But still with no success.
The connect part does not work.
Which ip address should I use? Or is there another ip address that I need to grab?
Thanks.
We tried running the codes without firewalls. But still with no success.
The connect part does not work.
Which ip address should I use? Or is there another ip address that I need to grab?
Thanks.
Still need more information, if you have two simple connections to the internet not through NAT and not behind a firewall it should work no problems, that fact it doesn''t.
Indicates one of the above, if your internet connection uses a router rather than a modem it may well be translating you IP (i.e. NAT) in which case you will need to access the router to map incoming ports back to you internal machine.
Indicates one of the above, if your internet connection uses a router rather than a modem it may well be translating you IP (i.e. NAT) in which case you will need to access the router to map incoming ports back to you internal machine.
hmm...is there a way i can get the translated IP address so that i can connect the two computers?
thanks.
thanks.
Assuming that you are doing everything correctly; filling in the sin_addr structure with network byte order address and port number etc. (posting some code would certainly help to see this) - then there must be an error when connecting.
If connect returns -1 (SOCKET_ERROR) then call WSAGetLastError() to find out what the error is. Tell me what that error code is.
Try also telling us which addresses you are actually connecting to. If your PC is connected to the Internet and a LAN are you definitely trying to connect to the correct IP address? If you are using private addresses on your LAN you will not be able to get a route to them over the Internet.
Post some source code or error code or something that helps to determine the problem?
If connect returns -1 (SOCKET_ERROR) then call WSAGetLastError() to find out what the error is. Tell me what that error code is.
Try also telling us which addresses you are actually connecting to. If your PC is connected to the Internet and a LAN are you definitely trying to connect to the correct IP address? If you are using private addresses on your LAN you will not be able to get a route to them over the Internet.
Post some source code or error code or something that helps to determine the problem?
"Absorb what is useful, reject what is useless, and add what is specifically your own." - Lee Jun Fan
"Absorb what is useful, reject what is useless, and add what is specifically your own." - Lee Jun Fan
You have to configure your NAT to open and redirect the port that the game communicates on to the machine hosting the game. This is different for each router but in general you have a list of ports, the protocol used (TCP or UDP) and the private IP of the machine that the port will be redirected to.
insert witty signature here
insert witty signature here
-------------------------http://www.roachpuppy.com
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement