Skip to content

A multithreaded TCP/UDP server which can handle multiple clients using threads.

License

Notifications You must be signed in to change notification settings

muazshahid/multithreaded_tcp_udp_server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Multithreaded TCP/UDP Server

A multithreaded TCP/UDP server which can handle multiple clients using threads.

The code compiles into an exectubale which creates TCP and UDP server using threads, this is only the server side implementation. Users can connect to the server using the netstat command which comes built-in in linux distribution.

The code uses Port 1234 for TCP Server and port 1235 for the UDP Server

Compiling

Compiling on Linux

cc server_tcp_udp.c -o server -lsocket -lnsl -lpthread 

Connecting to server

To install netstat

sudo apt-get install netstat

To connect to TCP server using netstat

netstat localhost:1234

To connect to UDP server using netstat

netstat -u localhost:1235

For connecting multiple clients, follow the same procedure from a different instance of terminal or a different computer.

About

A multithreaded TCP/UDP server which can handle multiple clients using threads.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages