Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Nobody ever mentions that UDP has one additional feature that TCP doesn't: preserving of message boundaries.


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


Seems to me that ZeroMQ basically implemented this - length-prefixed framing is part of the wire protocol.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: