3 ms·
Nobody ever mentions that UDP has one additional feature that TCP doesn't: preserving of message boundaries.
by skarap 10y ago
Nobody ever mentions that UDP has one additional feature that TCP doesn't: preserving of message boundaries.
- kmm 10y agoA 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
- moosingin3space 10y agoSeems to me that ZeroMQ basically implemented this - length-prefixed framing is part of the wire protocol.