Skip to content

abdullah-ihsan/Multi-Party-Chat-and-File-Sharing-using-C-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Multi-Party Chat and File Sharing using C++

The project uses TCP sockets to handle communication between different clients connected to the server. The project file contains cli.cpp and ser.cpp, along with the fileTransfer.h header file for functions responsible for file transferring. The messages are sent in a P2P model and the files through a server. Every client has its own directory containing files. Files transfer has been handled using fstream. Duplex chat is being handled by pthread_t.

How to use

  1. First, clone the repository to your system and change directory:
git clone https://github.com/abdullah-ihsan/Multi-Party-Chat-and-File-Sharing-using-C-
cd Multi-Party-Chat-and-File-Sharing-using-C-
cd Server
  1. Open at least two instances of the terminal, one for the server and the rest for clients (max 4 clients)
  2. First start the server using the following command
sudo ./server

and the client with this command

sudo ./client

image Every client contains an executable and other files available to transfer.

image One console for server and four consoles for clients in different directories.

image

Four clients have been connected. (MAX 5). Clients receive file information of rest of the clients.

image image

Messaging between clients and server broadcasting its message.

image image

File transferring between clients through the server.

About

Full duplex chat with file transfer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages