Chat In Terminal
Hello all. ?
Sockets and servers are vey important for connection and importantly chatting with others.??
I have thought of making a python script which will amek connection and eventually allow us to chat.
(DISCLAIMER – This python script runs only on localhost. If you want to make a connection with other devices then you should check the code of the server.py file and use network library in the client.py file)?
So, the thing that is done with this script is that, it starts a server and with the help of threading maintains many clients.
It is like chatting in the terminal. You can join the chat by starting the client.py file.
Getting Started ??
Working with it is very simple.
- There shouble be a host means the head of the chat
- The host should run the server.py file and note the password given by it.
- The host need to start another terminal and start client.py file and enter with name host ????
- He/She needs to give the correct password as given by the server to start the chat. ?
- Anyone cannot join the chat unless host has joined ?
- After host has joined, anyone can join now ????????
- Clients need to join with their nickname
- The message which will be send will be shown with their nickname in fron of the message
Commands to execute and things need to be installed
Python 3 need to be installed
You do not need to install anything because all teh libraries used here are built-in.
- Run the server.py file
- Open another terminal and run the client.py and join as host and give the password
(This is the video of the live example) – link to youtube – https://youtu.be/R8MLOCNbMu0
Feel free to contribute to this project
GNU Public License