Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multithreaded Chat Server

A client-server chat application written in C that demonstrates socket programming, multithreading, synchronization, and communication between multiple connected clients.

Overview

This project implements a multithreaded server capable of handling multiple client connections. Each connected client is handled through its own thread, allowing the server to process messages from multiple users concurrently.

The application parses user commands and provides the foundation for functionality such as user login, chat rooms, direct connections, and user management.

Features

  • Handles multiple client connections using POSIX threads
  • Uses socket-based communication between clients and the server
  • Assigns guest usernames to newly connected clients
  • Parses commands and user input
  • Broadcasts messages between connected clients
  • Tracks connected users using linked data structures
  • Uses mutexes to support synchronization
  • Provides command handling for chat operations such as login, rooms, users, connections, and logout

Technologies

  • C
  • POSIX Threads (pthreads)
  • Socket Programming
  • Linux
  • Make

Concepts Demonstrated

  • Client-server architecture
  • Multithreading
  • Concurrency and synchronization
  • Network socket communication
  • Command parsing
  • Linked data structures
  • Systems programming

Available Commands

The command interface includes:

  • login <username>
  • create <room>
  • join <room>
  • leave <room>
  • users
  • rooms
  • connect <user>
  • disconnect <user>
  • help
  • exit

Some command functionality was designed as part of the project's architecture and may not be fully implemented.

Building the Project

The repository includes a Makefile for compiling the project.

make

Purpose

This project was created as a systems programming project to gain hands-on experience with concurrent programming, network communication, synchronization, and client-server application design in C.

About

Multithreaded chat server built in C using socket programming, POSIX threads, synchronization, and command parsing.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages