Questions tagged [kryonet]

TCP and UDP client/server library for Java

KryoNet is a Java library that provides a clean and simple API for efficient TCP and UDP client/server network communication using NIO. It runs on both the desktop and on Android. It is very efficient, so is especially good for games. KryoNet can also be useful for inter-process communication.

KryoNet makes the assumptions that it will only be used for client/server architectures and that KryoNet will be used on both sides of the network.

The following resources are available for KryoNet:

151 questions
0
votes
1 answer

Kryonet: Best Data Structure?

I'm writing a graphical, online program in Java and using Kryonet library to handle the networking. I believe this library requires the packets to be instances of classes. I am not sure of this, however have not found any documentation suggesting…
0
votes
0 answers

Why Kryonet sending Object take too much network space?

I'm following a trivial sample official Kryonet page: https://github.com/EsotericSoftware/kryonet And in Server I only send an empty class object: MyEmptyObject object = new MyEmptyObject(); server.sendToAllTCP(object); But I'm worry about the size…
0
votes
1 answer

Kryonet doesn't send one specific packet

I have a Java network application realized with kryonet. The problem is that every packet is sent correctly but specific class doesn't reach the server. I have registered all the classes, here a brief overview: ... kryo.register(User.class,…
Niklas Hantke
  • 353
  • 1
  • 5
  • 20
0
votes
1 answer

How to reliably deploy a game server jar to a machine?

Well i have a game server now up and running on my local development machine but i want to deploy it to a real servermachine. The easiest way would be to just transfer the jar file to the server and run it with java -jar server.jar. But i want to…
laubed
  • 248
  • 1
  • 9
0
votes
1 answer

Kryo on Android: Could not find class 'sun.nio.ch.DirectBuffer'

I use Kryonet on Android, and after start up, the VM crashes with this error: Could not find class 'sun.nio.ch.DirectBuffer', referenced from method com.esotericsoftware.kryo.util.UnsafeUtil.releaseBuffer. What is the problem?
Baros
  • 53
  • 5
0
votes
1 answer

Slick2D game launches then immediately closes

I've been working with Slick2D and Kryonet to create a pretty basic multi-player RPG. While the server portion and database have been literally just plug and play it seems I'm having trouble with the graphics. Essentially when launch the client I…
0
votes
1 answer

Kryonet connect udp: Cannot assign requested address

I am new to server development. I am trying out Kryonent. I made a server using server.bind(8000,30003)//8000 as tcp port, 30003 as udp port and a client using client.connect(5000,"0.0.0.0",8000,30003);//5000 is timeout I am testing both client…
Yiou
  • 770
  • 1
  • 10
  • 19
0
votes
1 answer

How do you automatically pass all nested static classes into a method call as a parameter?

Is there a way of retrieving an array of static classes within the Network class (defined below), and pass each class's attribute class into a parameter of a method call kryo.register? public class Network { // Classes to be transferred between…
auroranil
  • 2,621
  • 6
  • 24
  • 34
0
votes
1 answer

How to write serializer for Array<>?

I have no idea how to approach this. I need to write a serializer for an Array<> object found in libgdx. public static void initialize(Server server) { Kryo kryo = server.getKryo(); kryo.register(ServerData.class); …
Neomex
  • 1,650
  • 6
  • 24
  • 38
0
votes
1 answer

Kryonet Serialization Error

Before anyone tries to tell me this is a duplicate I have tried the solutions on this and just about every other answer I could find. My project builds fine in IntelliJ, passes all the tests I've setup, it even runs from inside IntelliJ just fine,…
0
votes
0 answers

Can I send an ArrayList of objects with classes I made in kyronet? (Java)

There is not a problem with my code, I would just like to know if sending custom objects in an ArrayList was possible with Kryonet. For example, my game is an MMORPG and there are different maps. When a client requests a map from the server, I would…
vedi0boy
  • 1,030
  • 4
  • 11
  • 32
0
votes
2 answers

Kryonet chat POC timeout issue

So, i'm experimenting a little bit with the Kryonet library, and to start i've decided to develop a simple chat program that would allow to communicate from the client (the remote computer) to the server (local machine). Everything seems to work,…
Azsde
  • 11
  • 4
0
votes
2 answers

Registering a user?

I need to create a login/register system for my game but I have no clue on how this is commonly done. I already have setup a working client/server system with Kryonet where I can push data over the network. Any user can log in but once he…
Madmenyo
  • 8,389
  • 7
  • 52
  • 99
0
votes
2 answers

Cannot import/reference class from external package

I have two packages mg.networktest and mg.networktest.server, both need access to the same class for registering/serializing classes that need to be send over the network. I think the best practice would be to create it on the server package and…
Madmenyo
  • 8,389
  • 7
  • 52
  • 99
0
votes
1 answer

Kryonet client disconnects after send a packet to server (java)

I'm doing a little MMO project and right now I'm working on the login/register system. Whenever I try to send a ClientLoginPacket, the client disconnects from the server and the packet is not received at all by the server. There is no stack trace…
vedi0boy
  • 1,030
  • 4
  • 11
  • 32