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

Re: DataConnection objects

From: Randell Jesup <randell-ietf@jesup.org>
Date: Tue, 12 Jun 2012 04:59:58 -0400
Message-ID: <4FD7050E.4090400@jesup.org>
To: public-webrtc@w3.org
On 6/12/2012 4:48 AM, Michael Tuexen wrote:
> On Jun 12, 2012, at 10:25 AM, Randell Jesup wrote:
>
>> Building on the discussions today in the WebRTC W3 WG meeting:
>>
>> In PeerConnection, replace
>>
>> DataChannel createDataChannel (
>>      [TreatNullAs=EmptyString] DOMString? label,
>>      optional DataChannelInit? dataChannelDict);
>>
>> With
>>
>> DataConnection createDataConnection(short initialStreams);
>>
>> Add:
>>
>> interface DataConnection {
>>     DataChannel createDataChannel (
>>              [TreatNullAs=EmptyString] DOMString? label,
>>              optional DataChannelInit? dataChannelDict);
>>     attribute short maxStreams;
>>     const unsigned short CONNECTING = 0;
>>     const unsigned short OPEN = 1;
>>     const unsigned short CLOSING = 2;
>>     const unsigned short CLOSED = 3;
>>     readonly attribute unsigned short readyState;
>>     [TreatNonCallableAsNull]
>>              attribute Function?      onopen;
>>     [TreatNonCallableAsNull]
>>              attribute Function?      onerror;
>>     [TreatNonCallableAsNull]
>>              attribute Function?      onclose;
>>     void close ();
>> };
>>
>> readyState may need to be changed to strings
>>
>> Calling createDataConnection() before CreateOffer will cause the offer to include a DataConnection.  Calling it after the PeerConnection is connected will cause a renegotiation.
>>
>> There can only be one DataConnection per PeerConnection at any time; attempting to create a second one will fail.
>>
>> maxStreams lets you renegotiate the maximum number of simultaneous open streams.
> Just to be clear:
> Do you mean the maximum number (a limit you can not overcome with adding streams) of streams
> or the number of stream you initially negotiate and you can increase the number later
> by adding more streams?

I'm trying to expose the currently-negotiated maximum number of streams 
in SCTP; please offer language that's clearer and/or change names. 
Allowing this to be set on the DataConnection object allows an 
application to force a renegotiation of the number of streams before a 
createDataChannel requires it.  createDataChannel would still cause the 
maxStreams to increase if needed.

Also, we would not allow it to be set to a value lower than the number 
of active channels.

We could make this a read-only and just reflect the current state.


-- 
Randell Jesup
randell-ietf@jesup.org
Received on Tuesday, 12 June 2012 09:14:11 UTC

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