W3C home > Mailing lists > Public > public-webrtc@w3.org > June 2012

Re: Data channel issues

From: Harald Alvestrand <harald@alvestrand.no>
Date: Tue, 12 Jun 2012 10:56:30 +0200
Message-ID: <4FD7043E.1000700@alvestrand.no>
To: Adam Bergkvist <adam.bergkvist@ericsson.com>
CC: SUN Yang <sun.yang.nj@gmail.com>, "public-webrtc@w3.org" <public-webrtc@w3.org>
On 06/12/2012 10:26 AM, Adam Bergkvist wrote:
> On 2012-06-11 15:12, SUN Yang wrote:
>> Hi
>> I support early data, it is very benefitial for some information
>> exchange, for example: user status, device capability etc.
> People, at the interim meeting, seemed to prefer to wait for the open 
> event. One reason to align with the rest of the web platform (e.g. 
> WebSocket). I also think that the "early" part i mainly in the API 
> call flow - you're allowed to call send on a newly created DataChannel 
> object without waiting for the connected event. The channel still 
> needs to be setup properly before the data actually is sent.
I think this:

function OpenAndSendData = function(data) {
    conn = pc.CreateDataConnection();
    conn.onconnect = function() {

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" 
Received on Tuesday, 12 June 2012 08:57:55 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:28 UTC