Skip to content

A program that enables multi-client communication through a central server, using socket programming and threads for concurrent connections.

License

Notifications You must be signed in to change notification settings

bl33h/clientServerChat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 

Repository files navigation

clientServerChat

This is a chat application that facilitates communication between multiple clients through a centralized server. The application is designed using socket programming and handles multiple client connections concurrently using threads.


Chat Application Architecture

FilesFeaturesHow To UseContributions

Files

  • client.c: Implements the client-side of the chat application.
  • server.c: Implements the server-side of the chat application, managing multiple client connections.
  • chat.pb-c.c, chat.pb-c.h: Provide protobuf-c functionality for structured message communication between clients and server.

Features

  • Multi-client Support: The server can handle multiple client connections simultaneously.
  • Threaded Communication: Utilizes threads to manage client connections and maintain server responsiveness.
  • Protobuf Communication: Uses protobuf for structured and efficient data serialization.
  • Dynamic User Interaction: Supports real-time messaging, user status updates, and connection management.
  • Robust Error Handling: Implements error checking and handling to ensure reliable operation.

How To Use

To clone and run this application, you'll need WSL (Windows Subsystem for Linux) and the following tools installed on it: Git, C compiler, and POSIX threads. From your command line:

# Clone this repository
$ git clone https://github.com/bl33h/clientServerChat

# Open the project
$ cd src

# Compile the server and client
$ gcc -o server server.c chat.pb-c.c -lprotobuf-c -pthread
$ gcc -o client client.c chat.pb-c.c -lprotobuf-c -pthread

# Start the server (specify the port number)
$ ./server 12345

# In a new terminal, start a client
$ ./client 127.0.0.1 12345

About

A program that enables multi-client communication through a central server, using socket programming and threads for concurrent connections.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages