TALK TIME is a multi-client chat server application implemented in C, built as part of an Operating Systems project. It supports multiple client connections over TCP, allowing real-time messaging, chat history management, and sound notifications. The server is designed to handle concurrent client communication using threads, broadcasting messages, and saving chat history for future reference.
The project was developed and tested in an Ubuntu VirtualBox environment.
- Reliable TCP communication between server and multiple clients.
- Clients can send messages to the server, which broadcasts them to all other connected clients.
- Notification sound plays when a new message is received by a client.
- "exit.wav" sound plays when a client disconnects.
- Messages are timestamped and saved in
history.txt. - Each message includes the sender's name and the time it was sent.
- Server tracks connected clients and logs client joins/disconnects.
- "exit.wav" sound plays when a client disconnects.
- Server admin can view:
- List of currently connected clients.
- Chat history.
- Log of disconnected clients.
- Server uses threads to handle multiple clients simultaneously.
- Each client is assigned a unique thread for independent message handling.
- Ubuntu (or compatible Linux environment)
- GCC Compiler
-
Clone the repository:
git clone https://github.com/MAHN00R-IMRAN/OS-TalkTime-ChatApplication-.git cd talk-time -
Build the project using
make(see Makefile below): -
Run the server:
make all
-
In separate terminals, run the clients:
make allc
-
Clean up object files:
make clean
CC = gcc
CFLAGS = -pthread
all: gcc serverheader.h play_wav.c history_handling.c server_main.c client_handling.c
allc: gcc client.c
clean: #remove all files with extenshion .o. -> rm -rv *.o
open: gedit 726.c