This project is a terminal-based chat application built in C. It uses sockets for real-time communication, allowing users to join chat rooms, set nicknames and exchange messages seamlessly.
-
Multiple chat rooms for users to join and interact.
-
Customizable usernames
-
Real-time messaging.
-
Minimalistic terminal-based interface
-
A C compiler like GCC
-
Make (if you're using the provided Makefile)
-
A terminal
git clone https://github.com/felipemdutra/chat-rooms.git
cd chat-rooms
make
./chat_app
Open a new terminal window and type
nc localhost 8080
Open multiple terminal windows to simulate different clients.
After running the server and connecting as a client, try the following commands:
- Set a nickname:
\name <your-nickname>
- Create a chat room:
\create <room-name>
- List available rooms:
\list
- Join a chat room:
\join <room-name>
- Leave a room:
\leave
- Send a message:
Type and press Enter.
-
When a client disconnects, the client array doesn't change, causing errors
-
When a room is deleted, the rooms array doesn't change, causing errors
-
When a client leaves a room, the room's clients array does't change, causing errors