EsotericSoftware / kryonet

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

Sending classes that dont exist on the server but exist on all clients #168

Open newk5 opened 2 years ago

newk5 commented 2 years ago

Hello, is it possible to send classes that dont exist on the server but exist only on the clients?

For my use case, the server does not need to convert the received java.lang.Object to the corresponding class, that would be impossible since the server has no knowledge of the class type, however, all other clients connected to the server have that class and would be able to serialize it to the corresponding class type. Is there any way I can just receive the java.lang.Object on the server and then just send it to the clients and have the clients do the conversion? I've tried it but I get a KryoException: Unable to find class <classs name> error on the server.