For like, chatting with other people and stuff.
- To run as a server listening on port 4322:
./chat_app s 4322
- To run as a client listening on port 4322
./chat_app c 4322
Print the IP address of the process.
Print the port number the process is listening on.
Display a numbered list of all the currently logged-in clients
Display a numbered list of all the clients that have ever logged-in to the server and statistics about each one. Includes number of messages sent and received, and online/offline status
Display a numbered list of all the clients blocked by the client with ip address: <client-ip>
.
This command is used by a client to login to the server located at ip address: <server-ip>
listening on port: <server-port>
.
Get an updated list of currently logged-in clients from the server.
Send message: <msg>
to client with ip address: <client-ip>
.
Send message a <msg>
to all logged-in clients.
Block all incoming messages from the client with IP address: .
Unblock a previously blocked client with IP address: <client-ip>
.
Logout from the server.
Logout from the server (if logged-in) and terminate the application with exit code 0.