Skip to content

TALK TIME is a multi-client chat server application implemented in C, built as part of an OS project. The server supports multiple client connections over TCP, enabling real-time messaging, chat history management, and sound notifications and developed in a Ubuntu VirtualBox environment.

Notifications You must be signed in to change notification settings

imhnor/OS-TalkTime-ChatApplication-

Repository files navigation

TALK TIME - Multi-Client Chat Server

Project Overview

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.

Features

Client-Server Communication (TCP):

  • Reliable TCP communication between server and multiple clients.
  • Clients can send messages to the server, which broadcasts them to all other connected clients.

Sound Notifications:

  • Notification sound plays when a new message is received by a client.
  • "exit.wav" sound plays when a client disconnects.

Chat History:

  • Messages are timestamped and saved in history.txt.
  • Each message includes the sender's name and the time it was sent.

Client Management:

  • Server tracks connected clients and logs client joins/disconnects.
  • "exit.wav" sound plays when a client disconnects.

Interactive Server Console:

  • Server admin can view:
    • List of currently connected clients.
    • Chat history.
    • Log of disconnected clients.

Concurrency:

  • Server uses threads to handle multiple clients simultaneously.
  • Each client is assigned a unique thread for independent message handling.

Build and Run

Requirements:

  • Ubuntu (or compatible Linux environment)
  • GCC Compiler

Installation

  1. Clone the repository:

    git clone  https://github.com/MAHN00R-IMRAN/OS-TalkTime-ChatApplication-.git
    cd talk-time
  2. Build the project using make (see Makefile below):

  3. Run the server:

    make all
  4. In separate terminals, run the clients:

    make allc
  5. Clean up object files:

    make clean

Makefile

CC = gcc

CFLAGS = -pthread

Rules

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

Server Terminal Run Demo

server terminal

Server Terminal

server ternimal end

Client1

client1 terminal

Client2

client2 terminal

About

TALK TIME is a multi-client chat server application implemented in C, built as part of an OS project. The server supports multiple client connections over TCP, enabling real-time messaging, chat history management, and sound notifications and developed in a Ubuntu VirtualBox environment.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published