Files
Projet-UDP/ChatApp
2025-03-12 23:38:30 +01:00
..
2025-03-12 23:38:30 +01:00
2025-03-04 15:08:43 +01:00
2025-03-04 15:08:43 +01:00
2025-03-04 19:11:21 +01:00
2025-03-04 15:08:43 +01:00
2025-03-04 15:08:43 +01:00
2025-03-07 11:24:40 +01:00
2025-03-04 15:08:43 +01:00

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

If you want to create a server on a specific port, you can use:

./gradlew server --args="port" # Linux
.\gradlew server --args="port" # Windows

where port is the port you want to use.

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 /help in 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