Coders Packet

Chatroom using socket programming and multi-threading in C++

By Pramita Kastha

Chat application written in C++ that uses sockets and multi-threading to communicate among multiple users.

A simple client and a server can be used to send and receive messages using socket programming in C++. On top of that, we use multithreading to allow communication among multiple users.

The project folder contains four files, client and server cpp code, and client and server executable files (for linux).

This project involves OS specific libraries and hence can be compiled in linux only.

To compile run the following commands in command line(terminal):

g++ server.cpp -lpthread -o server

g++ client.cpp -lpthread -o client

To run the server, type ./server

To run the client, type ./client

To simulate multiple users, open up a new command line window and type ./client.

 

Download project

Reviews Report

Submitted by Pramita Kastha (prami1806)

Download packets of source code on Coders Packet