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

Packet organization for similar but different type messages

In a game, the server might have to send the client a packet with info to, lets say, add an Enemy. The data to add such an enemy might be similar to every enemy (position, id...) but there is a need to distinguish which enemy it is. Is it the…
Xkynar
  • 935
  • 1
  • 10
  • 31
0
votes
1 answer

Kryonet disconnect() connection cannot get TCP address

In my disconnect() method in the Listener, the InetSocketAddress object is always null. Why does this happen? @Override public void disconnected(Connection connection) { Log.info("Server disconnected from " +…
AnimatedRNG
  • 1,859
  • 3
  • 26
  • 39
0
votes
1 answer

KryoNet sendToAllTCP vs sendTCP

I am thinking about creating a networking game. The game should be a 2D platform shooter, created with Libgdx and Box2D. For the networking I planed following structure: Server and client are 2 programms Server handles ALL the ingame logic Client…
Robert P
  • 9,398
  • 10
  • 58
  • 100
0
votes
1 answer

Non wanted non-blocking socket with kryonet

I use kryonet to handle data exchange on network with a game. But I have no idea why the TCP socket and the UDP socket went Non-blocking. So I would be happy to have some help. I have a class for the server and one for the client. package…
Poroing
  • 61
  • 7
0
votes
1 answer

KryoNet: Client disconnects immediately after connecting

This seems to be a popular problem, but I'm still having trouble finding a solution even after spending a lot of time troubleshooting. I'm hoping there's an updated solution. I'm setting up a simple Server and Client with the KryoNet Java…
user2066880
  • 4,825
  • 9
  • 38
  • 64
0
votes
1 answer

Java process gets killed after depleting system memory. Why?

I'm running an Java app on Ubuntu 12.04.3 x64 VPS using Oracle Java. After few minutes the process gets killed by the OS: "killed" appears in the console. Before the crash, excessive memory usage can be seen using TOP (few gigabytes of virtual…
atok
  • 5,880
  • 3
  • 33
  • 62
0
votes
1 answer

Kryonet RMI performance

I was trying to run a performance test for Kryonet RMI, the test results are not convincing. However I think I may not be doing things in the right way. Can I get some feedback on the code below. SERVER import com.esotericsoftware.kryo.Kryo; import…
0
votes
2 answers

Using Kryonet with Libgdx

Hi so I know how to use Kyronet and libgdx but what I want to know is when installing the Kyronet library do I only have to copy it into the Main project folder or do I have to put it in the Android and Desktop folders as well or do I have to do…
Foxx
  • 43
  • 2
  • 8
0
votes
2 answers

Kryonet client disconnecting after timeout

My Kryonet server disconnects after 5000ms when I'm using this line for a connection client.connect(5000, host, Network.port); I thought the 5000 was the connection timeout but when I run the connection, it is able to connect and it receives the…
Chris
  • 2,435
  • 6
  • 26
  • 49
0
votes
1 answer

Kryonet connection successful but not receiving messages

Hi I am using Kryonet as my network library for the game I'm developing. I've got this code in the server side: public class MyServer { Kryo kryo; Server server; Connection connection; public MyServer(){ server = new…
yafrack
  • 654
  • 1
  • 8
  • 24
0
votes
1 answer

Kryonet: discovery host allways return null

I try to use Kryonet to create an online game. When I give the ip adress (hardcoded in the code), connection and sendind/receiving works. But if I try to discover the server, It's never responding me: the method always return null. Server: public…
Jonathan
  • 35
  • 1
  • 5
0
votes
4 answers

Multidimensional array with unknown size

I need to create an array with an undefined size, which will contain user information. For example: user[0]["name"] = "Patrick"; However, the standard java array seems to require a known length, which I don't know. What alternative can i use?…
Patrick Reck
  • 303
  • 1
  • 10
  • 24
0
votes
2 answers

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…
Patrick Reck
  • 303
  • 1
  • 10
  • 24
0
votes
1 answer

KryoNet - How do I start client with Boolean xx = new clientprocess(); to get a return value?

I'm creating a little JAVA multiplayer game using kryonet to manage the Server/Client part. I have a little question: in my server program, I start a client with a new called method, "on" a Boolean: Boolean xx = new clientprocess(); In my…
Mtx z
  • 9
  • 1
  • 2
-1
votes
1 answer

java kryonet - ChatMessage - Class is not registered

i just started to use kryonet. the chat example works fine when run from the examples folder. if i copy the chat client, server, and network files into another source folder in eclipse, i get IllegalArgumentException: Class is not registered:…
Ray Tayek
  • 9,841
  • 8
  • 50
  • 90
1 2 3
10
11