Chat-On π : A Python-Based Chat Room
This is a basic Python-based Secure Chat room. The project is entirely based on the Socket Progamming; done using Python. A server is set to the listening mode, with a specific IP Address and Port number (that can be edited in the script) and clients are made to connect to the server, after which they are promopted to enter a nickname. The messages are then broadcasted to all the clients present.
π Introduction
π Sockets
Sockets and the socket API are used to send messages across a network. They provide a form of inter-process communication (IPC). The network can be a logical, local network to the computer, or one thatβs physically connected to an external network, with its own connections to other networks. The obvious example is the Internet, which you connect to via your ISP.
<img align=βcenterβ height=300px src=https://github.com/IamLucif3r/Chat-On/blob/main/assets/Python-Sockets-Tutorial_Watermarked.webp>
Image Credit:Real Python
π TCP Socket
In the diagram below, given the sequence of socket API calls and data flow for TCP:
<img align=βcenterβ src=https://github.com/IamLucif3r/Chat-On/blob/main/assets/Screenshot%20at%202021-05-21%2010-47-40.png height=500px>
π Usage
- We will have to start our Server first.
Python Server.py
Note: Before running the server, make sure to edit the IP address and Port number. By default it is running on Localhost:5555
- Run the Client file, to start the conversation.
Python Client.py
- Now Enter a nickname and start chatting.
Demo-Video πΉ
This is a demo video of the Working of this project.
Contribution
π Youβre welcome to contribute in this project. Make a new branch, Commit your changes and send me a Pull Request. Iβll merge it in the main branch β
Contact
π¬ Contact with me via email: sanmol016@gmail.com