Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This project is a simple networking chat application designed to strengthen my understanding of socket programming and real-time communication between systems. As a software engineer, I built this project to gain hands-on experience with network protocols, multi-client handling, and concurrent programming.

The application allows multiple users to connect to a central server and communicate with each other in real time. Users can send public messages, request a list of connected users, send private messages, and disconnect safely.

How to Run the Software

Step 1: Start the Server

Open a terminal and run:

python server.py

Step 2: Start the Client(s)

Open one or more additional terminals and run:

python client.py

Step 3: Use the Chat

  • Enter a username when prompted
  • Start sending messages

Available Commands

  • /list → Displays all connected users
  • /msg username message → Sends a private message
  • /quit → Disconnects from the server

Purpose

The purpose of this software is to deepen my understanding of networking concepts, specifically how client-server systems communicate over TCP. It also helped me practice structuring multi-file programs, handling multiple users with threads, and designing simple communication protocols.

[Software Demo Video] https://youtu.be/OKjG7p8tUkk


Network Communication

Architecture

This application uses a Client-Server Model. A central server manages all client connections and handles message routing. Clients connect to the server to send and receive messages.

Protocol and Ports

  • Protocol: TCP (Transmission Control Protocol)
  • Port Number: 5555
  • Host: 127.0.0.1 (localhost for testing)

TCP is used to ensure reliable communication between the server and clients.

Message Format

Messages are sent as plain text strings encoded in UTF-8.

Examples:

Public message:

Hello everyone

Private message:

/msg John Hello

Command:

/list

The server interprets messages that begin with / as commands and processes them accordingly.


Development Environment

Tools Used

  • Visual Studio Code (code editor)
  • Terminal / Command Prompt
  • Python interpreter

Programming Language and Libraries

  • Language: Python 3
  • Libraries:
    • socket → for network communication
    • threading → for handling multiple clients simultaneously

Useful Websites


Future Work

  • Add a graphical user interface (GUI) using Tkinter
  • Implement user authentication (login system)
  • Save chat history to a file or database
  • Improve error handling and reconnection support
  • Add timestamps to messages

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages