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.
- 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
- Open at least two instances of the terminal, one for the server and the rest for clients (max 4 clients)
- First start the server using the following command
sudo ./server
and the client with this command
sudo ./client
Every client contains an executable and other files available to transfer.
One console for server and four consoles for clients in different directories.
Four clients have been connected. (MAX 5). Clients receive file information of rest of the clients.
Messaging between clients and server broadcasting its message.
File transferring between clients through the server.