- From: Randell Jesup <randell-ietf@jesup.org>
- Date: Tue, 12 Jun 2012 05:06:32 -0400
- To: public-webrtc@w3.org
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