Skip to content

Latest commit

 

History

History
62 lines (43 loc) · 1.36 KB

File metadata and controls

62 lines (43 loc) · 1.36 KB

Distributed Chat System

A simple multi-user chat system built with Python TCP sockets and threads. No external libraries required.

Demo Video

Watch Demo

Files

File Purpose
server.py Accepts connections, manages nicknames/channels, routes messages
client.py Connects to the server, sends and receives messages

Requirements

  • Python 3.x (standard library only)

Running

1. Start the server

python server.py

2. Start one or more clients (each in its own terminal)

python client.py

Enter the server IP, port (12345 by default), and a nickname when prompted.

Commands

Command Description
/nick <name> Set or change your nickname
/join <channel> Join a channel
/msg <nick> <text> Send a private message
/quit Disconnect from the server

Typing anything without a / sends a message to your current channel.

Example Session

/nick Hamid
/join general
Hello everyone!
/msg John Hey, this is private
/quit

Features

  • Multiple simultaneous clients via thread-per-client
  • Named channels with broadcast messaging
  • Private messages between users
  • Graceful disconnect and crash recovery
  • Server-side logging for transparency