ChatAPP
An instant messaging app using Java and the UDP protocol.
How to run
Console
Server + Client
You can create a server and an "admin" client by using:
./gradlew admin # Linux
.\gradlew.bat admin # Windows
You will receive the notifications of the server (handshakes, ...).
Server
You can create a server by launching:
./gradlew server # Linux
.\gradlew server # Windows
This will create the server on a random port available and indicate it through the terminal.
To launch the server on a particular port, simply use:
./gradlew server --args="port" # Linux
.\gradlew server --args="port" # Windows
where port is the port you want to use.
Client
To create a client, you may use:
./gradlew client # Linux
.\gradlew client # Windows
How to use
As soon as you launch a client, you will be prompted to enter your name. You will then be in the lobby. From here you can join whatever room that is created, and you will be able to chat with the other clients in the room. You will also be able to create a new room.
Commands
Tip
The commands can be found by typing
/helpin the chat, in the lobby or in any room.
Note
All the commands are prefixed by
/.
- /createRoom roomName
- /listRooms
- /joinRoom roomName
- /leaveRoom
- /room
- /bye
- /help
Note
There are some aliases for the commands:
- /create
- /list
- /join
- /leave