A small asyncio TCP chat server. Multi-room, plaintext, with in-memory state and periodic JSON persistence.
- Run
nc <server-address> <port>(ask me for the address and port). - Enter the password when prompted (ask me if you know me).
- Pick a username.
- Start chatting.
Commands:
/join <room>— switch rooms (default islobby)/who— list users in your room/quit— disconnect
Windows users don't have nc by default — install ncat (choco install nmap) or run the same nc command from WSL.
Requires Python 3.10+. No external dependencies.
CHAT_PASSWORD=hunter2 python3 chat_server.pyThen connect from another terminal:
nc 127.0.0.1 8888