EsotericSoftware / kryonet

TCP/UDP client/server library for Java, based on Kryo
BSD 3-Clause "New" or "Revised" License
1.82k stars 419 forks source link

Cannot connect with external IP #81

Closed vincaslt closed 9 years ago

vincaslt commented 9 years ago
client.connect(5000, Config.SERVER_IP, Config.TCP_PORT);
server.bind(Config.TCP_PORT);

I can connect fine from the same computer if I set SERVER_IP as "127.0.0.1" "localhost", but when I put my actual external IP in, I cannot connect. My ports are open, and canyouseeme.org is able to connect, but client throws:

java.io.IOException: Unable to connect to: /78.60.200.138:54832
    at com.esotericsoftware.kryonet.TcpConnection.connect(TcpConnection.java:92)
vincaslt commented 9 years ago

Sorry, my port forwarding worked weirdly, managed to do that properly now.