Using kryonet without serializer (just as client for an existing server)

Hello guys,

I’m trying to create a client for a server application. This server has it’s own clients and netcode, but it’s open source. I’d like to stay compatible to it and therefore I’d like to recreate the packets it’s sending in my client application (first byte 0xe2, second byte 0xee and so on).

I wanted to use kryonet, because it’s so simple and easy to use (I fought a small battle with NIO - it works, but kryonet seems so much sexier).

Therefore my question: Is it possible to use it without having the server to be a kryonet application, too?

Citation from the kryonet docs: “This must be done on both the client and server, before any network communication occurs. It is very important that the exact same classes are registered on both the client and server, and that they are registered in the exact same order. Because of this, typically the code that registers classes is placed in a method on a class available to both the client and server.”

I didn’t find a example, which is using packet classes with a specific byte order.

Greetings
-Thomas

KryoNet expects to control what is sent. Eg, it sends FrameworkMessage.* objects. A KryoNet client isn’t meant to connect to a non-KryoNet server. You could hack it up to do this, but it doesn’t have an API for this purpose.

Nooooooo :confused:

can you recommend a different framework?

Learn how to use sockets.

Do you mean I should just start two threads of sockets instead of using NIO? Does that make more sense for gaming? I’m targeting Android, does that have influence in the choice?

You can use Netty.