blacknbunny / C-UDP-Client-Server

C UDP Protocol Client And Server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

C-UDP-Client-Server

C UDP Protocol Client And Server

Compiling UDP Server

gcc udpserver.c -o udpserver

Compiling UDP Client

gcc udpclient.c -o udpclient


Usage :

Type Usage
UDP Server ./udpserver [port]
UDP Client ./udpclient [local_ip] [local_or_remote_port]

This If Structure Used for 'Bind: Address already in use' Error.

if (setsockopt(sockfd,SOL_SOCKET,SO_REUSEADDR,&tr,sizeof(int)) == -1) {
   perror("Setsockopt ");
   exit(1);
}

About

C UDP Protocol Client And Server

License:GNU General Public License v3.0


Languages

Language:C 100.0%