TCP not working over the internet
Posted 08 February 2016 - 08:09 AM
The problem is that i made a TCP online game, it works fine playing in LAN (with the same computer) but when i tried to play with a friend he connects, but doesn't receive any packets and i(the server) don't receive his packets.
Posted 12 February 2016 - 05:23 PM
You cannot send data to some location, unless one of the following is true:
1) The ip you're sending data to is a static ip of the server itself
2) The port you're sending data to is port forwarded to the server
3) The client is expecting a response from the server, which would happen through systems like UDP holepunching
4) The ip address you're sending to is a local ip address
If none of the above apply, your message is disregarded and not received by the other end.
At least, this is what happens to my knowledge.