Skip to content

Command-line Chat Application using Socket Programming

License

Notifications You must be signed in to change notification settings

UtkarshAhuja2003/Chat_Room

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Socket Programming Chat Room

This is a simple command-line chat application that uses socket programming to establish a connection between the client and the server. The application is developed in C and supports both Windows and Linux operating systems.

Requirements

  • C compiler (GCC recommended)

  • Windows or Linux operating system

Installation

  1. Clone the repository git clone https://github.com/UtkarshAhuja2003/chat-app.git

  2. Navigate to the project directory cd chat-app

  3. Compile the server and client source code by running

  • Linux gcc -o server server.c and gcc -o client client.c
  • Windows gcc -o server server.c -lws2_32 and gcc -o client client.c -lws2_32

Usage

  1. Start the server by running ./server

  2. Start the client by running ./client

  • Chat will continue until both the users write BYE

Screenshot

image

About Socket Programming

This chat application uses socket programming to establish a connection between the client and the server. Sockets are the endpoint of a bidirectional communication channel between two programs running on a network. A socket has a "type" (e.g., SOCK_STREAM for TCP or SOCK_DGRAM for UDP), an IP address, and a port number.

In this project, the server creates a socket and binds it to a specific port. The client then connects to the server using the IP address and port number of the server's socket. Once the connection is established, the client and server can send and receive data using the socket.

Resources

Contributing

We welcome contributions to this project. If you would like to contribute, please fork the repository, make your changes and submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Releases

No releases published

Packages

No packages published

Languages