Skip to content

Govindmanoj2004/Eavesdrop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chat Room Project (C)

Overview

The Chat Room Project is a simple client-server application written in C that allows multiple users to connect and communicate in real-time via the terminal. It demonstrates core networking concepts such as sockets, multithreading, and TCP communication.

Features

  • Multiple clients can connect to a single server
  • Real-time text messaging between clients
  • Server broadcasts messages to all connected clients
  • Basic command-line interface

Technologies Used

  • C Programming Language
  • POSIX Sockets (TCP)
  • Threads (POSIX pthread)

Project Structure

chat-room/
│
├── src/
│   ├── server.c      # Server-side logic
│   ├── client.c      # Client-side logic
│   └── common.h      # Shared constants & function declarations
│
├── Makefile          # For building server and client
└── README.md         # Project documentation

How to Compile and Run

1. Compile the Server and Client

gcc src/server.c -o server -lpthread
gcc src/client.c -o client -lpthread

2. Run Server and Client in Separate Terminals

Terminal 1 (Server):

./server

Terminal 2+ (Clients):

./client

Usage

  1. Start the server first by running ./server
  2. Connect clients by running ./client in separate terminal windows
  3. Type messages and press Enter to send them to all connected clients
  4. Use Ctrl+C to disconnect clients or stop the server

Requirements

  • GCC compiler
  • POSIX-compatible system (Linux, macOS, WSL)
  • pthread library support

Future Enhancements

  • User authentication and nicknames
  • Private messaging between specific users
  • Message history and logging
  • GUI interface
  • File sharing capabilities

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages