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

When Binding both TCP and UDP, the listener doesn't run. #8

Closed ghost closed 10 years ago

ghost commented 10 years ago

From bertram1...@gmail.com on December 24, 2010 04:39:40

What steps will reproduce the problem?

  1. Create a new server object. (Server server;)
  2. Add a listener to the server. (server.addListener(new Listener() {..})
  3. Bind the server to a random TCP and UDP port. (server.bind(1234, 1235);)
  4. Execute the server.
  5. Connect to the server using a client. The events within the listener don't fire. What is the expected output? What do you see instead? The server's listener events should fire. But instead, they don't. What version of the product are you using? On what operating system? I am using the newest version of kryonet on Linux, with NetBeans as the IDE. Please provide any additional information below. I noticed that it only works when TCP is binded. That is, instead of specifying 2 integers (TCP_PORT, UDP_PORT) and only specifying 1, for the TCP port, events will fire.

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

ghost commented 10 years ago

From nathan.s...@gmail.com on January 13, 2011 16:01:48

Sorry for the delayed response, I missed this issue during the holidays and only just now stumbled upon it again.

How are you connecting the client? You will see the behavior described if you start the server with both TCP and UDP (server.bind(1234, 1235)) but only use TCP when connecting a client (client.connect(6000, 1234)). Be sure to use both ports for the client (client.connect(6000, 1234, 1235)).

What errors do you see in the logs?

If you still have a problem, can you post a simple example so I can reproduce the issue?

ghost commented 10 years ago

From nathan.s...@gmail.com on February 09, 2011 02:01:18

(No comment was entered for this change.)

Status: Invalid