EsotericSoftware / kryonet

TCP/UDP client/server library for Java, based on Kryo
BSD 3-Clause "New" or "Revised" License
1.82k stars 419 forks source link

Client Disconnects immediately #33

Closed ghost closed 10 years ago

ghost commented 10 years ago

From binoysku...@gmail.com on February 22, 2013 21:08:37

What steps will reproduce the problem? 1.Create a server 2.Create a client 3.Client connects to server I expect client to get connected and stay or continue that connection until a close operation is called. Instead Client gets connected initially but disconnects immediately I m using Kryonet 2.12 on Windows 7. Please provide any additional information below.

Original issue: http://code.google.com/p/kryonet/issues/detail?id=32

ghost commented 10 years ago

_From mr_emr...@hotmail.com on April 26, 2013 05:42:45_

We are having the same problem here, though it doesnt disconnect right after a connection has been established but rather when sending custom packges, which have been registered before.

Its kinda hopeless, we tried lots of things. Could someone help?

ghost commented 10 years ago

From paul6...@gmail.com on May 17, 2013 03:22:27

I have the same Problem, I found a bugfix in a comment on youtube.

IF YOUR CLIENT IMMEDIATELY DISCONNECTS AFTER CONNECTING:

  1. Use kryonet version 2.12 instead of the latest version
  2. Add an argument to the client/server constructors for a UDP port. For example, change this: server.bind(1881); to this: server.bind(1881, 1881); And do the same thing for the client.connect() function. This will fix your problems. Thumbs up so people can see!

Then my projekt was working Maybe it can help the author of the projekt to find the bug in build 2.18 and above

Is the projekt in development or it is discontinoued?

ghost commented 10 years ago

From nathan.s...@gmail.com on May 17, 2013 09:39:38

OP says 2.12 has an issue. #3 says 2.18 is fixed but latest has an issue. The tests work, so if you have this issue you will need to debug it: enable trace logging, step through it, etc. Not enough information to reproduce.

Status: Invalid

ghost commented 10 years ago

From quccm...@gmail.com on June 05, 2013 16:18:17

custom packges must have empty constructor,otherwise serialization will fail!