Re:UDP vs TCP
by skarap on Thursday December 29, 2016 @04:57AM
(#13276527)
Nobody ever mentions that UDP has one additional feature that TCP doesn't: preserving of message boundaries.
[ Parent
| on HN ]
A datagram-like protocol with the reliability of TCP might be nice.
I once implemented a communications protocol that worked with variable-length independent messages over TCP. It felt a little silly pushing distinct datagrams into a stream, that would be chopped up into a packets, sent to another PC, where the OS would then reassemble those packets back into a stream, only to be chopped up again in messages.
Implementing the system for chopping up the stream really felt like it should have been done by a lower level as well, not in an application
Re:UDP vs TCP
by moosingin3space on Saturday December 31, 2016 @03:15PM
(#13292918)
Seems to me that ZeroMQ basically implemented this - length-prefixed framing is part of the wire protocol.