UDP is a connection-less protocol where you simply send messages. It has nothing to guarantee integrity.

TCP is connection-based and you have to establish a connection with a HANDSHAKE before streaming data to each-other like a pipe. Then you have to close it when you're done. But it guarantees integrity.

But the connection-based model doesn't make sense for peer-to-peer networks like activitypub and matrix, where messages simply need to be send and received from any to any. These systems are based on HTTP POST requests which makes it work like datagrams again... but each message involves establishing a new connection and then closing it... unless keep alive is used which makes it even more convoluted...

Why don't we have a protocol that's connectionless like UDP but with the integrity of TCP?

I guess that's what QUIC is doing...

Reply to this note

Please Login to reply.

Discussion

Even so, QUIC is not quite adopted much in numbers of (opensource) libraries yet. libcurl is no exception