Sample chat application written in JavaFX (client + multithreaded server). FXML layout was created in JavaFX Scene Builder.
The project contains:
- Client chat application
- "/nkok" - information from a server that the nickname for a given client was accepted
- "/nkrm xxx" - changed/removed nickname
- "/nonk" - nick was incorrect or not defined at all
- "/nkex" - information that nickname already exists
- Chat server (multithreaded)
Name of a particular client (client's nickname) is always highlighted on the list with active clients (users that are logged in establish a connection with the server). After establishing the connection user needs to enter a nickname using "/nick [nickname]" pattern. Following information/alerts are received in a text form from the server:
Each client's nickname is checked whether it is unique in the "realm" of logged users.
Each client is placed in a separate thread (threadsArray is populated with them).
Further details regarding this application can be found in the comments added to the source code.