Re: [rtcweb] JSEP/WebRTC API Datachannel question

Christian Groves <Christian.Groves@nteczone.com> Tue, 15 April 2014 05:14 UTC

Return-Path: <Christian.Groves@nteczone.com>
X-Original-To: rtcweb@ietfa.amsl.com
Delivered-To: rtcweb@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4CBFF1A033B for <rtcweb@ietfa.amsl.com>; Mon, 14 Apr 2014 22:14:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.8
X-Spam-Level:
X-Spam-Status: No, score=0.8 tagged_above=-999 required=5 tests=[BAYES_50=0.8] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AfysmITOJtaZ for <rtcweb@ietfa.amsl.com>; Mon, 14 Apr 2014 22:14:05 -0700 (PDT)
Received: from cserver5.myshophosting.com (cserver5.myshophosting.com [175.107.161.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9AEA81A031A for <rtcweb@ietf.org>; Mon, 14 Apr 2014 22:14:04 -0700 (PDT)
Received: from ppp118-209-199-135.lns20.mel6.internode.on.net ([118.209.199.135]:57736 helo=[127.0.0.1]) by cserver5.myshophosting.com with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128) (Exim 4.82) (envelope-from <Christian.Groves@nteczone.com>) id 1WZvh0-0004KR-QX for rtcweb@ietf.org; Tue, 15 Apr 2014 15:13:58 +1000
Message-ID: <534CC016.3020901@nteczone.com>
Date: Tue, 15 Apr 2014 15:13:58 +1000
From: Christian Groves <Christian.Groves@nteczone.com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0
MIME-Version: 1.0
To: rtcweb@ietf.org
References: <534616DC.7090800@nteczone.com>
In-Reply-To: <534616DC.7090800@nteczone.com>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - cserver5.myshophosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - nteczone.com
X-Get-Message-Sender-Via: cserver5.myshophosting.com: authenticated_id: christian.groves@nteczone.com
X-Source:
X-Source-Args:
X-Source-Dir:
Archived-At: http://mailarchive.ietf.org/arch/msg/rtcweb/chf5rSfcBqvHEx-ogCmzTy-Mlkk
Subject: Re: [rtcweb] JSEP/WebRTC API Datachannel question
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Real-Time Communication in WEB-browsers working group list <rtcweb.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/rtcweb/>
List-Post: <mailto:rtcweb@ietf.org>
List-Help: <mailto:rtcweb-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 15 Apr 2014 05:14:07 -0000

I'll take a punt that people were thinking about 2 below when data 
channel was added. In order to clarify that I propose to add the 
following text to the JSEP draft to clarify this.

http://tools.ietf.org/html/draft-ietf-rtcweb-jsep-06#section-5.2.1
Replace:
"Lastly, if a data channel has been created, a m= section MUST be
    generated for data. The <media> field MUST be set to "application" 
and the <proto> field MUST be set to "DTLS/SCTP", as specified in 
[I-D.ietf-mmusic-sctp-sdp], Section 3; the "fmt" value MUST be set to 
the SCTP port number, as specified in Section 4.1."

With:
/  "Lastly, if createDataChannel has been called a m= section MUST be 
generated for data. In the case of multiple createDataChannel calls only 
one m= section is generated. The <media> field MUST be set to 
"application" and the <proto> field MUST be set to "DTLS/SCTP", as 
specified in [I-D.ietf-mmusic-sctp-sdp], Section 3; the "fmt" value MUST 
be set to the SCTP port number, as specified in Section 4.1."/

New text in 
http://tools.ietf.org/html/draft-ietf-rtcweb-jsep-06#section-5.2.2:
(above last paragraph)
/ "If createDataChannel has been called and a m= section has not 
previously been generated, a m= section MUST be generated for data. In 
the case of multiple createDataChannel calls only one m= section is 
generated. The <media> field MUST be set to "application" and the 
<proto> field MUST be set to "DTLS/SCTP", as specified in 
[I-D.ietf-mmusic-sctp-sdp], Section 3; the "fmt" value MUST be set to 
the SCTP port number, as specified in Section 4.1.//
//
//If all data channels have been closed, the m= section related to the 
data channels MUST be marked as recvonly by changing the value of the 
[RFC3264] directional attribute to "a=recvonly".//"/

It would also be good to add some text regarding the relationship 
between a createDataChannel and DCEP DATA_CHANNEL_OPEN I'm not sure if 
the JSEP draft is the place?

Also the W3C draft could be updated to indicate the interaction of a 
createDataChannel with the negotiationneeded event in section 5.2 
something along the lines of:
/7. For the first creation of a RTCDataChannel object fire a 
negotiationneeded event at connection./


Regards,
Christian



On 10/04/2014 1:58 PM, Christian Groves wrote:
> Hello,
>
> I've looked into the JSEP draft and WebRTC API (as well as the 
> datachannel and DCEP drafts) to get a better understanding of how and 
> when the SDP for the DTLS/SCTP Web-RTCDataChannel will be generated 
> and what will trigger the DCEP protocol. Unfortunately I find myself 
> more confused after the process .
>
> I was trying to find some text regarding what happens in terms of SDP 
> and DCEP when an endpoint uses multiple datachannels per 
> peerConnection. e.g.
>
> pc = new RTCPeerConnection(configuration);
> channel = pc.createDataChannel("chat");
> channel = pc.createDataChannel("clue");
>
> Now based on the WebRTC API 
> (http://dev.w3.org/2011/webrtc/editor/webrtc.html#peer-to-peer-data-api), 
> I understand that a createOffer() is used to generate the required SDP 
> for the data channel. This is also mentioned in Clause 5.2.1 "initial 
> offers" draft-ietf-rtcweb-jsep-06 indicates: /"Lastly, if a data 
> channel has been created, a m= section MUST be generated for data..."/
>
> The WebRTC API cl.5.1.2 "createDataChannel" step 9 says /"Create 
> channel's associated underlying data transport and configure it 
> according to the relevant properties of channel."/ Now unfortunately 
> it doesn't really say want this amounts to. Create could be "a new 
> SCTP association" or it could be "using DCEP to do a 
> DATA_CHANNEL_OPEN" or both.
>
> If I look at the RTCPeerConnection Interface for addStream I see that 
> it indicates that a negotiationneeded event (WebRTC API cl.4.3.2.3 
> step 5) is fired. This is a trigger for the createOffer(). The example 
> 10.1 WebRTC API shows this behavior. 10.3 also shows this behavior for 
> createDataChannel but the Peer-to-Peer Data API doesn't indicate that 
> the negotiationneeded event is triggered when establishing a data 
> channel.
>
> I looked at the RTCDataChannel closure procedure to see if this would 
> shed any more light but simply says that the underlying data transport 
> may be torn down. The JSEP draft isn't any help here either as it 
> doesn't talk about RTCDataChannel closure at all.
>
> So its not clear to me from the drafts/API whether:
> 1. each createDataChannel results in an offer with new m-line 
> "webrtc-datachannel",
> 2. the first createDataChannel results in an SDP offer with m-line 
> "webrtc-datachannel" and subsequent createDataChannels result in DCEP 
> DATA_CHANNEL_OPENs on the existing webrtc-datachannel.
> 3. a mix of the above an endpoint can indicate multiple m-lines 
> "webrtc-datachannel" and have multiple DCEP DATA_CHANNEL_OPENs per 
> m-line.
>
> Its clear from draft-ietf-rtcweb-data-channel-07 that "Multiple 
> simultaneous data channels MUST be supported in the peer connection" 
> but that doesn't clarify the above.
>
> Is there any specification text that clarifies this?
>
> Regards, Christian
>
> _______________________________________________
> rtcweb mailing list
> rtcweb@ietf.org
> https://www.ietf.org/mailman/listinfo/rtcweb
>