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

Not able to find anyone when discovering hosts #45

Open ghost opened 10 years ago

ghost commented 10 years ago

From felix.ne...@gmail.com on October 27, 2013 17:13:03

What steps will reproduce the problem?

  1. Code: Server server = new Server(); server.start(); server.bind(17771, 5000); Client client = new Client(); List<InetAddress> addresses = client.discoverHosts(17771, 5000); System.out.print(addresses);
  2. Run Code on two Computers which are in the same network
  3. Both PCs are able to create, start and bind the servers (without any errors)
  4. Both PCs print [](Empty list). Also, when I press a refresh button (which executes "List<InetAddress> addresses = client.discoverHosts(17771, 5000); System.out.print(addresses);" after the Servers were created on both PCs) then I get a "[]" message again. No Hosts found... Help is appreciated :) What is the expected output? What do you see instead? What version of the product are you using? On what operating system? Please provide any additional information below.

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

ghost commented 10 years ago

From felix.ne...@gmail.com on October 27, 2013 09:14:42

Is there any way to edit the ticket? I forgot to remove the last lines.

Hralien commented 10 years ago

Some news/fix/tips about that problem?

NathanSweet commented 10 years ago

Some routers block broadcasts. Also note it only works on a LAN with the same subnet.

madpew commented 10 years ago

Also it might not work on WLAN, depending on the client-isolation-settings of the hotspot.