ChatOnRing is a chat application based on a ring network structure developed as part of the "Computer Networks and Internet" course. It allows nodes to communicate within the network using TCP and UDP protocols. The application supports node registration, message exchange, and network visualization functionalities. For more information, please refer to assignment.pdf.
To use the ChatOnRing application, follow these steps:
- Clone the repository to your local machine.
- Compile the source code using the provided makefile.
- Run the executable file to start the chat application with the following arguments:
./COR "local_ip" "local_port" "nodes_server_ip" "nodes_server_port"
- Use the available commands:
join (j) ring id
: Join a chat ring by specifying the ring identifier (3 digit number) and your id (2 digit number)direct join (dj) id succid succIP succTCP
: Directly join the ring chat by contacting the specified node in succid succIP succTCPshow topology (st)
: Shows the identifiers and contacts of your node, your successor, and your second successorshow routing (sr) dest
: Shows the routing chart of a node relative to a destiny dest (ifdest
is specified as "all" it will show the complete table)show path (sp) dest
: Shows the shortest path from a node to a destiny (ifdest
is specified as "all" it will show the complete table)show forwarding (sf)
: Shows the forwarding chartmessage (m) dest message
: Send a message to the destiny nodeleave (l)
: Leave the ring chatexit (x)
: Leave the application
- Join the ring network with a unique identifier.
- Leave the network when needed.
- Directly join a specific node in the network.
- View the current network topology and routing layers.
- Send messages to other nodes in the network.