logoalt Hacker News

afavouryesterday at 2:39 PM1 replyview on HN

UDP is a protocol, not an API


Replies

mlhpdxyesterday at 4:17 PM

True. But it’s also true that trying to shoehorn every use case into TCP streams is counter productive.

A stream API can layer over UDP as well (reading in order of arrival with packet level framing), but such a stream would a bit weird and incompatible with many stream consumers (e.g. [de]compression). A UDP API is simpler and more naturally event (packet) oriented. The concepts don’t mix well.

Still, it would be nice if they browser supported a UDP API instead of the weird and heavy DTLS and QUIC immitations.

show 2 replies