Update README.md
This commit is contained in:
@@ -3,15 +3,47 @@ An instant messaging app using Java and the UDP protocol.
|
||||
|
||||
## How to run
|
||||
|
||||
> [!WARNING]
|
||||
> As of now, the app rely on ANSI escape character, thus not available on Windows.
|
||||
> However, this feature is under development.
|
||||
### Console
|
||||
|
||||
You can run the app by launching the `ChatApp` class. This will create the server (port `6665`) and a first client,
|
||||
(creating by the way a room (`101`)).
|
||||
#### Server + Client
|
||||
|
||||
You can then create more clients by launching the `Client` class. It will connect to the server
|
||||
(be sure you launched it first) on the default port `6665`.
|
||||
You can create a server and an "admin" client by using:
|
||||
|
||||
```shell
|
||||
./gradlew admin # Linux
|
||||
.\gradlew.bat admin # Windows
|
||||
```
|
||||
|
||||
You will receive the notifications of the server (handshakes, ...).
|
||||
|
||||
#### Server
|
||||
|
||||
You can create a server by launching:
|
||||
|
||||
```shell
|
||||
./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:
|
||||
|
||||
```shell
|
||||
./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:
|
||||
|
||||
```shell
|
||||
./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
|
||||
|
||||
Reference in New Issue
Block a user