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
23
votes
4 answers

Which NIO library (Netty, Grizzly, kryonet, ...) for simple backend server implementation in Java?

Our frontend is simple Jetty (might be replaced with Tomcat later on) server. Through servlets, we are providing a public HTTP API (more or less RESTful) to expose our product functionality. In the backend, we have a Java process which does several…
Japer D.
  • 754
  • 1
  • 9
  • 18
7
votes
2 answers

Kryonet and android

I am trying to use Kryonet in an Android application, but when I try it on the Android virtual device, and even on my Android cell phone, I get this error: -Could not find class 'com.esotericsoftware.kryonet.Client', referenced from method…
6
votes
1 answer

java.lang.StackOverflowError when using Kryo to serialize objects with references to each other

I have a graph-like object that I'm sending from server to client that contains nodes that have adjacencyLists. I have something similar to this: Clearing c1 = new Clearing(1, 134, 151); Clearing c6 = new Clearing(6, 250,…
Abe Fehr
  • 729
  • 9
  • 23
4
votes
1 answer

Increase buffer size in server/client in Kryonet

How do I increase the buffer size in Server/Client constructor in Kryonet?
nebula
  • 3,932
  • 13
  • 53
  • 82
4
votes
1 answer

Run Server when Integration Testing with Gradle

I've developed a client-server-architecture using Kryonet and Gradle with roughly the following structure Parent project X, containing projects A and B Project A (server) Project B (client), containing integration and unit test classes Now…
Knight
  • 53
  • 1
  • 5
4
votes
1 answer

Kryonet -- How can I register classes within my class?

I have the following class: public class QueryResults { protected Set resultList = new HashSet(); protected long executionTime = 0; public long getExecutionTime() { return executionTime; } [...] } And I register it…
MrDuk
  • 16,578
  • 18
  • 74
  • 133
4
votes
1 answer

Android game with server/client not working using kryonet

I have been trying for days to work out whats wrong, changing things etc, has been of no avail. Get the following error in android studio, when trying to debug client side with my Samsung device: com.esotericsoftware.kryonet.KryoNetException:…
cfl
  • 999
  • 1
  • 14
  • 34
4
votes
1 answer

Sending and receiving arrays in kryonet

I'm using kryonet to create a Server/Client system. I'm trying to send an int[][] to my client, from the server. To achieve this task I tried this: publc class ArrayPacket { public int[][] array } Then, in the server listener I wrote: ArrayPacket…
A Cat
  • 629
  • 7
  • 20
4
votes
4 answers

Which is the most efficient serialization techninqe that must be language independent

Currently I am starting a project, which needs to serialize the data from .net application ( c# app) and pass it throug a network to a java based server application. Therefore I would like to know which serialization mechanism is most efficient and …
4
votes
5 answers

Kryonet disconnects just after connecting

I followed this Youtube tutorial covering the basics of Kryonet. Basically it is a Kryonet Hello World, it explains how to setup a basic Server and a Client, allowing the Client to send Packets to the Server and have very basic communication. A link…
TMichel
  • 4,336
  • 9
  • 44
  • 67
4
votes
1 answer

How do I maintain movement speed with a server?

I'm programming a server for my game and cannot figure out how to mantain the movement speed. Depending on what's running on the computer, the movement is either very fast or very slow. I've already tried to make my own delta methods for the server,…
niccholaspage
  • 41
  • 1
  • 6
3
votes
4 answers

Kryonet reliability

Is there anyone who has used the Java Kryonet library in a project willing to share their experience? I've seen it recommended a few times, but haven't actually seen anybody talk about their experiences using it. Specifically, I want to make sure…
jnackman
  • 326
  • 4
  • 15
3
votes
2 answers

Boolean not changing in thread

I have a class MPClient and MultiplayerMatch. MultiplayerMatch, in his constructor, creates a MPClient runnable thread. To avoid data overflow, I have a boolean named "moved" in MultiplayerMatch that changes to true when the player is moving. In the…
Evenilink
  • 85
  • 1
  • 10
3
votes
1 answer

Kryonet. RMI. Response timed out while trying to execute remote method

I`m trying to bootstrap simple kryonet RMI project with two separate client and server applications. But when I try to execute remove method - it leads to: Exception in thread "main" com.esotericsoftware.kryonet.rmi.TimeoutException: Response timed…
3
votes
1 answer

Kryonet - buffer overflow - small object sending

Hiho. Everything was running without problems on localhost. Now the server is set on a professional host. The error is always the same: 10-04 16:35:29.974 5730-5830/com.drkmns.gameloopballs E/AndroidRuntime: FATAL EXCEPTION: Thread-8160 10-04…
user5064340
1
2 3
10 11