Start listening for tcp connections
This commit is contained in:
parent
5d85a6061a
commit
1d3e56e9b7
1 changed files with 9 additions and 1 deletions
|
@ -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() {
|
||||
discoverActiveUsers();
|
||||
userList.startDiscoveryListening();
|
||||
startListening();
|
||||
Platform.runLater(this::showChat);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue