Giter VIP home page Giter VIP logo

clientserverchat's Introduction

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

clientserverchat's People

Contributors

bl33h avatar mendezg1 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.