Patrick Reck
Patrick Reck

Reputation: 303

How do I send user information over KryoNet?

I've created a gameserver containing an ArrayList of players (Player). However, as far as i've been able to read, Kryonet can't send objects with a constructor in it to the client (Player have that), so i need to find an alternate way of transferring the ArrayList.

What would be a proper way to accomplish this?

Upvotes: 0

Views: 458

Answers (2)

Jonathan Camarena
Jonathan Camarena

Reputation: 149

You just need to make the object have a default constructor with no arguments. you can still create the object with a constructor that takes in parameters.

Upvotes: 0

someone
someone

Reputation: 6572

You could use JMS implementation (in my case it ActiveMq) and send a Object message.

Upvotes: 1

Related Questions