Closed Rolleander closed 8 years ago
There's no problem sending UDP to localhost. See PingPongTest and others.
Hmmm, sending from my server with udp to my clients doesnt work. Maybe I have a wrong UDP port, that doesnt work on localhost.
I noticed only the server cant send via UDP to the client (both on localhost). The clients sendUDP to the server works. But it still crashes if the server tries to send UDP. (with TCP it doesnt happen).
After debugging for a while i finally found the reason my client crashed: Because I used connection.sendUDP() on my server, while working on localhost. This resulted in a client connection lost with no exceptions appearing from kryonet, so I had to debug every step until I found this. (The server just said client disconnected). Now I know you cant send UDP to localhost, but maybe throwing an exception in KryoNet would be nice.