[RTW] Comments on draft-alvestrand-dispatch-rtcweb-datagram

Harald Alvestrand harald at alvestrand.no
Thu Jan 6 16:38:32 CET 2011


On 01/06/11 08:05, Justin Uberti wrote:
>
>
>     Background: I had a discussion with a coworker who wanted to have
>     a single API to both streaming and datagram service; I believe it
>     makes more sense to define an API to a datagram service and an API
>     to a streaming service separately - the big argument for PseudoTCP
>     is the client-to-client connection case, where one often finds
>     that UDP works and TCP doesn't.
>
>
> I had been thinking the datagram and streaming services should use a 
> single API - much of the API ends up being the same, and that's how 
> BSD sockets work. There are a few differences for streaming services, 
> but they are mostly (entirely?) additive (flow control being the main 
> one).

The huge difference is that a streaming API gives you a sequence of 
bytes, in strict order, while a datagram API gives you a (not 
necessarily ordered) sequence of datagrams. Each datagram is guaranteed 
to be treated as an unit, but order is not preserved. There is no 
guarantee about block boundaries in a stream (you have to create them 
yourself if you want them), but order is strictly preserved.

For most of the rest of the functions, the APIs can (and should) be the 
same, but the sending and reception of data is different.

                       Harald


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.alvestrand.no/pipermail/rtc-web/attachments/20110106/d5c337e0/attachment.html>


More information about the RTC-Web mailing list