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

No serialization/deserialization, just send/receive chars? #110

Closed Wulf closed 7 years ago

Wulf commented 8 years ago

Hi, I'd like to use kryonet to send/receive chars between a Java server and a node.js client.

I'm thinking this is possible if I create my own Serialization implementation or even JsonSerialization! Correct me if I'm wrong?

Label: Question.

DevCubeHD commented 7 years ago

I like you idea.. Just use netty or send Strings with kryonet

Wulf commented 7 years ago

Yeah the sending party wasn't hard, what made it difficult was stopping the connection from closing because the nodejs client didn't send keepAlive packets which the kryonet server was expecting.

I tried faking the keepAlice packet by sending a string "alive" from the client to the server and then have the server create a keepAlive packets and register it for the client, but that felt too hacky and it ended up not working anyway.

I had to abandon kryonet and just use websockets.