A multithreaded chat server implemented in Python using TCP sockets. Supports real-time communication between multiple clients with both private and broadcast messaging, session logging, and graceful shutdown. Includes both script and executable versions for ease of use.
- Multithreaded Server: Each client connection is handled in a separate thread.
- Private and Broadcast Messaging: Send direct messages or messages to all connected clients.
- Graceful Shutdown: Clients and the server can disconnect cleanly using dedicated commands.
- Chat Logging: All messages are recorded in
chat_documentation.txt. - Cross-Platform Execution: Run via Python scripts or provided executables.
server.py/server.exe– Server implementation in script and executable form.client.py/client.exe– Client implementation in script and executable form.chat_documentation.txt– Generated chat session log.Multi-Threaded Chat Server.pdf– Full documentation and setup guide.
- Run
server.exe. TypeTerminate serverin the console to stop. - Run
client.exefor each client instance. Enter a unique name when prompted. - Use
@client_name messageto send private messages. - Type
exitto disconnect a client.
Note: If your firewall or antivirus blocks the executables, either allow them explicitly or use the Python scripts instead.
- Open the project folder in your IDE.
- Run
server.pyto start the server. - Duplicate
client.pyasclient_1.py,client_2.py, etc. for multiple clients. - Run each client script in a separate terminal or IDE instance.
- Use the same messaging and exit commands as in Method 1.
- Broadcast: Type a message and press Enter.
- Private Message:
@username Hello there - Disconnect Client: Type
exit - Shutdown Server: Type
Terminate server
- Python 3.x (if using scripts)
- Compatible OS for running
.exefiles (Windows)
Shalev Atsis
Computer Science Student, HIT College
📞 +972-58-5060699
📧 [email protected]
🔗 LinkedIn Profile
For more detailed documentation and screenshots, see Multi Threaded Chat Server.pdf.