Closed sanjeev909 closed 9 years ago
KryoNet uses Kryo for serialization. Kryo doesn't have a schema specification. It is intended that the same version of Kryo is on both ends. This simplifies many things but makes it difficult if not using the same version of Kryo on both ends.
Thanks Nathan,
Does kryonet not add its own elements to the transmitted buffer, like it prefixes the length of the content in the first 4 bytes.
thanks Sanjeev
Found the cause for the problem...
Method writeReferenceOrNull()...inserts a byte at position 2...but while reading position-2 is not read as a reference.
What are references, and how do they synch up?
This is the line of code in Kryo.java that adds a reference
if (references && writeReferenceOrNull(output, object, false)) { registration.getSerializer().setGenerics(this, null); return; }
Got it. Thats because references is false in the server, while it was true in the client.
@sanjeev909 are you planning on releasing your Cocoa version of the kryonet library by any chance?
could we close this issue if it is no longer needed?
Hi,
As I dig deeper into the kryonet/kryo libraries, I appreciate the power and simplicity of the framework. Amazing work folks.
I'm trying to serialize cocoa-objects over a socket connection to kryonet server. The server is correctly matching the source class to registered class and completing the serialization at the server end.
I'm almost there, but for the following issues -
Will appreciate if you can point to the protocol elements to be inserted in the buffer.
Regards Sanjeev