A Command Line Chat App made with Python
This can also be used as an example for Socket programming
- Socket
- Sys
- Threading
python server.py
python server.py {Address of the server}
i.e- python server.py 127.0.0.1
The server socket initializes and binds with the address and port
It constantly listens for incoming connections
A "handler" thread starts for each incoming connections
The thread looks for the message from their respective clients and sends it to the other clients
The client socket is initialized
The sendMsg daemon is initialized
It send the message in form of bytes to the server which further sends it to other clients
The recvMsg daemon is initialized
It recieves message from the server which is initially sent by some other client