Skip to content

Akshit8/tcp-vs-udp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TCP v/s UDP server in golang

start the server

# start a tcp server
go run main.go tcp.go udp.go -p tcp

# start a udp server
go run main.go tcp.go udp.go -p udp

Using Telnet to connect to TCP server

telnet 127.0.0.1 8080
>> Hi
>> Server
>> TCP

Using Netcat to connect to UDP server

echo "Hi" | nc -w 1 -u 127.0.0.1 8081
echo "Server" | nc -w 1 -u 127.0.0.1 8081
echo "UDP" | nc -w 1 -u 127.0.0.1 8081

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages