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

Something that works in 2.12 doesn't work in 2..20 #37

Open ghost opened 10 years ago

ghost commented 10 years ago

From lovelyfa...@gmail.com on July 26, 2013 14:05:05

What steps will reproduce the problem?

  1. I followed this simple tutorial at http://www.youtube.com/watch?v=1fLXEL4ngpE
  2. When i run the server, and then the client i get this message 0:00 INFO: [kryonet] Server opened. 00:00 TRACE: [kryonet] Server thread started. 00:15 DEBUG: [kryonet] Port 54555/TCP connected to: /127.0.0.1:52642 00:15 TRACE: [kryonet] Connection listener added: com.esotericsoftware.kryonet.Server$1 00:15 TRACE: [kryo] Write class 9: com.esotericsoftware.kryonet.FrameworkMessage$RegisterTCP 00:15 DEBUG: [kryo] Write: com.esotericsoftware.kryonet.FrameworkMessage$RegisterTCP 00:15 TRACE: [kryo] Write field: connectionID (com.esotericsoftware.kryonet.FrameworkMessage$RegisterTCP) 00:15 TRACE: [kryo] Write int: 1 00:15 TRACE: [kryo] Object graph complete. 00:15 TRACE: [kryonet] Connection 1 sent TCP: RegisterTCP (6) 00:15 INFO: [kryonet] Connection 1 connected: /127.0.0.1 00:15 INFO: [SERVER] Someone is trying to connect. 00:15 TRACE: [kryonet] Unable to read TCP from: Connection 1 java.io.IOException: An existing connection was forcibly closed by the remote host at sun.nio.ch.SocketDispatcher.read0(Native Method) at sun.nio.ch.SocketDispatcher.read(Unknown Source) at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source) at sun.nio.ch.IOUtil.read(Unknown Source) at sun.nio.ch.SocketChannelImpl.read(Unknown Source) at com.esotericsoftware.kryonet.TcpConnection.readObject(TcpConnection.java:107) at com.esotericsoftware.kryonet.Server.update(Server.java:192) at com.esotericsoftware.kryonet.Server.run(Server.java:350) at java.lang.Thread.run(Unknown Source) 00:15 INFO: [SERVER] Someone is trying to disconnect. 00:15 INFO: [kryonet] Connection 1 disconnected.
  3. But when i change the library from 2.20 to 2.12 Everything is fine. I dont need to change anything at all What is the expected output? What do you see instead? What you type in the client gets shown in the server What version of the product are you using? On what operating system? 2.20, problem persist in 2.18 too Please provide any additional information below. I create a bitbucket repository so you didnt have to look through all the tutorial https://bitbucket.org/fjoseph/kryonet-error

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