Re: Data channel issues

On 6/12/2012 4:56 AM, Harald Alvestrand wrote:
> I think this:
>
> function OpenAndSendData = function(data) {
>    conn = pc.CreateDataConnection();
>    conn.onconnect = function() {
>       conn.send(data);
>    }
> }
>
> will accomplish exactly the same thing as browser-buffered "early" data,
> at the expense of a short trip through the JS layer on the "onconnect"
> event.

Yes.  If you want allow multiple send()s it's a little more complex, but 
still possible.  It also is an extra 1/2 or full RTT delayed in addition 
to the JS trip compared to send() as soon as created.

Note this is still buffering in memory, just in JS instead of the stack.

-- 
Randell Jesup
randell-ietf@jesup.org

Received on Tuesday, 12 June 2012 09:13:11 UTC