README
This program is a simple chat application that allows users to connect with each other over TCP/IP connections. It provides a user-friendly command-line interface for managing connections and exchanging messages.
To run the program, execute the following command in the terminal:
./chat <port_number>
Replace <port_number> with the port on which you want the program to listen for incoming connections.
Upon launching, the program acts as a UNIX shell and provides the following command options:
-
help: Display information about the available user interface options or command manual.
-
myip: Display the IP address of this process.
-
myport: Display the port on which this process is listening for incoming connections.
-
connect
<destination><port_no>: Establish a new TCP connection to the specified destination at the specified port. -
list: Display a numbered list of all the connections this process is part of.
-
terminate
<connection_id>: Terminate the connection with connection id from connection list. -
send
<connection_id><message>: Send a message to the connection with connection id from connection list. -
exit: Close all connections and terminate this process.