###### Is the server listening for connections on the default port?
##### Try opening 3 terminals, run on the first terminal the command `"./net-cat -p <port>"` and on the second and third terminal run the command `"./net-cat <host ip> <port>"`.
##### Try running `"./TCPChat" 2525 localhost`.
```
[USAGE]: ./TCPChat $port
```
###### Did server respond with usage, as above?
##### Try running `"./TCPChat 2525"`.
###### Is the server listening for connections on the port 2525?
##### Try opening 3 terminals, run on the first terminal the command `"./TCPChat <port>"` and on the second and third terminal run the command `"nc <host ip> <port>"`.
###### Does both clients connect to the server with success?
###### Does both clients connect to the server with success?
##### Try opening 4 terminals, run on the first terminal the command `"./net-cat -u -p <port>"` and on the second, third and fourth terminal run the command `"./net-cat -u <host ip> <port>"`.
##### Try creating a server and 2 Clients.
###### Does all clients connect to the server with [UDP](https://www.privateinternetaccess.com/blog/2018/12/tcp-vs-udp-understanding-the-difference/) connection?
###### Did the server responded with a linux logo and asked for the name?
##### Try creating a server and 2 Clients.
##### Try creating a server and 2 Clients.
###### Do all Clients receive a message informing that the Client joined the chat?
###### Do all Clients receive a message informing that the Client joined the chat?
@ -31,16 +40,27 @@
###### Does the rest of the Clients receive a message notifying that the Client left?
###### Does the rest of the Clients receive a message notifying that the Client left?
##### Try creating a server and 3 Clients. Then send messages between the Clients.
##### Try creating a server and 3 Clients. Then send messages between the Clients.
###### Are the messages identified by the name of each Client and the time that the messages was sent?
@ -31,17 +31,20 @@ Here is a simple example of connection and transmission between Server-Client by
- To see the host IP use the command `ifconfig` on the server host machine.
- To see the host IP use the command `ifconfig` on the server host machine.
Your project must work in a similar way that NetCat works, in other words, you must create a group chat. The project must present :
Your project must work in a similar way that NetCat works, in other words, you must create a group chat. The project must have the following features :
- TCP or UDP connection between server and multiple clients (relation of 1 to many). The type of connection must be established by using a flag, just like `nc`, by default it uses TCP connection, but if you want to use UDP connection present the flag `-u`.
- TCP connection between server and multiple clients (relation of 1 to many).
- Each Client must have an user name.
- A name requirement to the client.
- Control connections quantity.
- Clients must be able to send messages to the chat.
- Clients must be able to send messages to the chat.
- Messages sent, must be identified by the time that was sent and the user name of who sent the message.
- Do not broadcast EMPTY messages from a client.
- Messages sent, must be identified by the time that was sent and the user name of who sent the message, example : `[2020-01-20 15:48:41][client.name]:[client.message]`
- If a Client joins the chat, all the previous messages sent to the chat must be uploaded to the new Client.
- If a Client joins the chat, all the previous messages sent to the chat must be uploaded to the new Client.
- If a Client connects to the server, the rest of the Clients must be informed by the server that the Client joined the group.
- If a Client connects to the server, the rest of the Clients must be informed by the server that the Client joined the group.
- If a Client exits the chat, the rest of the Clients must be informed by the server that the Client left.
- If a Client exits the chat, the rest of the Clients must be informed by the server that the Client left.
- All Clients must receive the messages sent by other Clients.
- All Clients must receive the messages sent by other Clients.
- If a Client leaves the chat, the rest of the Clients must not disconnect.
- If a Client leaves the chat, the rest of the Clients must not disconnect.
- If there is no port specified, then set as default the port 8080. Otherwise, program must respond with usage message: `[USAGE]: ./TCPChat $port`
This project will help you learn about :
This project will help you learn about :
@ -52,70 +55,163 @@ This project will help you learn about :