

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
click for more info
Not enough gems
Cost: 6 gems
1: TCP
incomplete
2: TCP vs. UDP
incomplete
3: UDP Sender
incomplete
4: Files vs. Network
incomplete
This lesson's interactive features are locked, please to keep using them
Click to play video
User Datagram Protocol (UDP) is often compared to TCP, as they are both transport layer protocols. Here are the high-level differences between the two:
| TCP | UDP | |
|---|---|---|
| Connection | Yes | No |
| Handshake | Yes | No |
| In Order | Yes | No |
| Blazingly Fast | No | Yes |
TCP establishes a connection between sender and receiver with a handshake, and ensures that all the data is sent in order. UDP yeets the data to the receiver and hopes they can make sense of it.
There are a lot of good TCP/UDP memes...
That's because TCP requires a connection to be established before data can be sent! UDP has no such requirement.
go run ./cmd/tcplistener | tee /tmp/tcplistener.txt
Run and submit the CLI tests.