Start listening for tcp connections

This commit is contained in:
Arnaud Vergnet 2020-12-16 12:07:56 +01:00
parent 5d85a6061a
commit 1d3e56e9b7

View file

@ -100,9 +100,17 @@ public class MainController implements Initializable {
} }
} }
private void startListening() {
if (userList != null) {
userList.startDiscoveryListening();
userList.startUserListening((e) ->
Log.e(this.getClass().getSimpleName(), "Error listening to users", e));
}
}
private void startChat() { private void startChat() {
discoverActiveUsers(); discoverActiveUsers();
userList.startDiscoveryListening(); startListening();
Platform.runLater(this::showChat); Platform.runLater(this::showChat);
} }