News for hackers. Stuff that matters.
Re:Never* Use Datagrams by eru on Monday June 24, 2024 @01:40AM (#40772889)
If you have a reliable-byte-stream abstraction, you only need to add a way to serialise your messages into bytes, and you get a reliable-messages-in-order abstraction for 'free'. That's convenient! And you don't need to teach your lower level protocols about where your higher level messages start and end.

You can also stick your higher level messages into a structure that's more complicated than a stream, eg you can stick them into a tree. Anything you can serialise, you can send.

Of course, the downside to this is that when you don't need these strong guarantees, you are paying for stuff you don't need.

There are no comments on this comment yet.