This project aims to implement a simple chat application with Python using sockets. It enables text-based communication between clients and the server.
client.py: Client side code. Can connect to the server on another device and chat.server.py: Main server side code. It allows clients to connect and communicate.
-Python 3.x
- Clone or download the project files to your computer.
-
pip install -r requirements.txt
- Assign the IP and port information of the computer on which the server will run to the HOST_IP and HOST_PORT variables in the
chat_server.pyfile. - Run
chat_server.pyto start the server side. - Enter the server information into the DEST_IP and DEST_PORT variables in
chat_client.py - Start
chat_client.pyto start the client side and connect to the server. - Enter username on the client side and start chatting.
- The user must use the
quitcommand to exit the conversation. - To send a message, write as follows:
recipient_name > message