Closed william-reed closed 10 years ago
In case anyone meet this issue (as I did) try using debug jars instead of production jars, set log level to (at least) debug, and make sure every instance that should be sent on the network have a constructor without parameters.
I know this is closed for more than 4 years, but it wasn't documented in a way that you don't try to send classes without constructors, because you don't know they have to have such a constructor.
Because this cost me almost 2 hours to track down, I kindly request to document this a lot more verbosely. (And thanks to @Pyeroh for the hint)
@liketechnik This is not an issue with KryoNet per se, but rather the Kryo serialisation. The version used of Kryo (2.24) doesn't show a corresponding error message when a constructor is missing. This is fixed in later versions. So to prevent this issue, either don't use the Kryo serialisation (which kinda defeats the purpose) or just use a more up to date version of Kryo with KryoNet.
After creating a server and connecting a client things work fine. If I set client.setKeepAliveTCP(100); I can see from the server that these messsages are repeatidly being recieved by the server. But as soon as I use sendTCP(object) the client disconects