This project is a TCP-based chat room application written in Python. It allows up to 5 clients to connect and communicate with each other in real-time.
-
TCP Protocol: The chat room utilizes the TCP (Transmission Control Protocol) for reliable and ordered communication between the server and clients.
-
Multiple Clients: The application is designed to handle up to 5 clients simultaneously. Each client can connect to the server and participate in the chat room.
-
Real-time Communication: The chat room provides real-time communication between clients. Messages sent by one client are immediately broadcasted to all other connected clients.
-
Simple and Intuitive: The chat room has a user-friendly interface, making it easy for clients to connect, send messages, and view the ongoing conversation.
-
Start the server by running the
main_server.py
script. -
Run the
main_client.py
script on up to 5 different machines or terminals to connect clients to the chat room. -
Once connected, clients can start sending and receiving messages in real-time.
To run this project on your local machine, follow these steps:
- Clone the repository:
$ git clone https://github.com/HaykDanghyan/tcp-chat-room.git
- Change into the project directory:
$ cd tcp-chat-room
- Run the
main_server.py
file and enter the port you want the chat to run
$ python3 main_server.py
Enter the port number of Server:
- Run the
main_client.py
file up to 5 times and enter your name and the same port that you entered for the server
$ python3 main_client.py
Enter your name:
Enter the port you want to connect: