A client-server chat application written in C that demonstrates socket programming, multithreading, synchronization, and communication between multiple connected clients.
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.
- 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
- C
- POSIX Threads (pthreads)
- Socket Programming
- Linux
- Make
- Client-server architecture
- Multithreading
- Concurrency and synchronization
- Network socket communication
- Command parsing
- Linked data structures
- Systems programming
The command interface includes:
login <username>create <room>join <room>leave <room>usersroomsconnect <user>disconnect <user>helpexit
Some command functionality was designed as part of the project's architecture and may not be fully implemented.
The repository includes a Makefile for compiling the project.
makeThis 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.