feat: display broadcast user name

This commit is contained in:
Arnaud Vergnet 2020-12-07 15:40:23 +01:00
parent 0b13c1242b
commit 6ef37e2d72

View file

@ -43,9 +43,9 @@ public class MainApp extends Application {
netDiscoverer = new NetDiscoverer(); netDiscoverer = new NetDiscoverer();
// Network discovery test // Network discovery test
netDiscoverer.startDiscoveryListening("Yohan", null, Throwable::printStackTrace); netDiscoverer.startDiscoveryListening("Bob", null, Throwable::printStackTrace);
netDiscoverer.discoverActiveUsers("Broadcast", netDiscoverer.discoverActiveUsers("Broadcast",
(ipAddr, data) -> System.out.println("User detected at address : " + ipAddr.toString()), (ipAddr, data) -> System.out.println("User detected at address : " + ipAddr.toString() + " with name " + data),
Throwable::printStackTrace); Throwable::printStackTrace);
// TCP communnication tests // TCP communnication tests