Skip to content

adityavaidya108/TcpServerinC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

TCP Server in C

Features

  • Written without third-party libraries, this server uses only the standard C library and system calls(socket(), connect(), send(), recv(), etc.), for socket programming and handling client connections.

  • TCP Server for Handling Client Connections. This is a simple multi-client TCP server implemented in C that listens for incoming connections on port 1001

Running the Server

  1. Compile the server:

    gcc streamsocketserver.c -o server 
  2. Run the server:

    ./server
  • The server will now be listening on port 1001 and waiting for client connections.

Client

  • The client connects to the server running on PORT 1001 and sends/receives messages.
  • It first establishes a connection to the server, receives a welcome message, and then allows the user to send messages to the server.

Running the Client

  1. Compile the client:

    gcc streamsocketclient.c -o client 
  2. Run the server:

    ./client

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages