Home > Uncategorized > Simple #UDP/IP client/server in C#

Simple #UDP/IP client/server in C#

udp

TL;DR;

You can grab the code for this demo here https://github.com/infiniteloopltd/udp

Internet traffic can be thought of as layers, normally the stack for viewing a website is IP at the bottom, TCP/IP in the middle, and HTTP at the top.

IP just gets data from A to B , TCP/IP makes sure that data doesn’t get jumbled or dropped in between, and HTTP does things specific to serving websites, like HTTP redirects, HTTP error messages etc.

But, instead of TCP/IP you can also use UDP/IP or simply “UDP”, which is TCP’s messy little brother. It still has the concept of ports like TCP has, but offers no guarantee of jumbled or dropped data.

For this reason, UDP is only used in situations where low latency is much more important than data integrity, like audio / video streaming or gaming. It’s terrible for file transfer.

One other key use of UDP is it’s lower bandwidth usage, which makes it useful for IOT applications over expensive mobile data networks.

If you want to read more about Network programming, check out my book- which you can Buy at Amazon US or Buy at Amazon UK

 

Advertisement
Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: