akshayxemo / TCP-Client-Server-Socket

It's a chatting system implemented in C - Programming Language by using TCP-Socket programming. In this project multiple Client can send and receive message between each other until they are connected to the Server. Clients can use multiple commands and command format provided by the server to communicate with the server and other clients.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TCP-Client-Server-Socket

It's a chatting system implemented in C - Programming Language by using TCP-Socket programming. In this project multiple Client can send and receive message between each other until they are connected to the Server. Clients can use multiple commands and command format provided by the server to communicate with the server and other actively connected clients via server.

Prerequisites

1. Linux OS (if you are windows user use WSL or any Virtual Machine with Linux installed)
2. GCC compiler

If you consider using WSL here is how you can install WSL and Ubuntu or any other distributor in your windows system

Installation

Start by updating the package list

  sudo apt update

Install GCC compiler

  sudo apt-get install gcc -y

Check GCC version

  gcc --version

Compile & Run the code

First compile Server.c and Client.c as server and client

  gcc Server.c -o server
  gcc Client.c -o client

Then run server

  ./server

Then run client in differnt terminal at same location (you can run same client to multiple terminal to connect more clients with the server)

  ./client

Screenshots

RUNNING SERVER AND CLIENT

Screenshot 2023-05-04 200954

USE OF SOME BASIC COMMAND AND EXIT THE CLIENT

Screenshot 2023-05-04 201035

RUNNING CLIENT ON SAME TERMINAL AND ANOTHER CLIENT ON DIFFERNT TERMINAL

Screenshot 2023-05-04 201144

SENDING MESSAGE FROM CLIENT 3 TO CLIENT 2

Screenshot 2023-05-04 201243

Screenshot 2023-05-04 201253

SOME WRONG INPUTS AND RESPONSE FROM SERVER

Screenshot 2023-05-04 201452

Screenshot 2023-05-04 201506

LIST COMMAND TO CHECK STATUS OF CLIENTS

Screenshot 2023-05-04 201531

CLOSING CLIENT AND THEIR STATUS

Screenshot 2023-05-04 201545

Screenshot 2023-05-04 201607

About

It's a chatting system implemented in C - Programming Language by using TCP-Socket programming. In this project multiple Client can send and receive message between each other until they are connected to the Server. Clients can use multiple commands and command format provided by the server to communicate with the server and other clients.


Languages

Language:C 100.0%