This project combines a multithreaded TCP chat server with a Caesar cipher. It allows multiple clients to connect to the server, exchange messages, and have outgoing messages encoded using a Caesar shift before being sent.
- Multithreaded TCP server that accepts multiple client connections
- Handles each client in a separate thread
- Messages can be sent from the server console to all connected clients
- Outgoing messages are encoded with a Caesar cipher (shift = 3)
- Demonstrates networking + simple cryptography in Python
- Clone or download the repository.
- Run the server script:
python caesarchat.py- Connect with a client (e.g.,
nc):
nc localhost 10000- Type messages in the client to send them to the server.
- Type messages in the server console — they will be Caesar-encoded before being sent to all clients.
-
The
connected_clientslist is referenced but not implemented — you need to store(conn, address)pairs for broadcasting to work. -
The Caesar cipher currently only encodes lowercase alphabetic characters.
-
This project can be extended by:
- Adding decryption on the client side
- Supporting custom shift values
- Managing clients properly (joining, disconnecting, broadcasting)