[rtcweb] JSEP/WebRTC API Datachannel question

Christian Groves <Christian.Groves@nteczone.com> Thu, 10 April 2014 03:58 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 05A611A03F4 for <rtcweb@ietfa.amsl.com>; Wed, 9 Apr 2014 20:58:33 -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 5pjurAd4WtT2 for <rtcweb@ietfa.amsl.com>; Wed, 9 Apr 2014 20:58:29 -0700 (PDT)
Received: from cserver5.myshophosting.com (cserver5.myshophosting.com [175.107.161.1]) by ietfa.amsl.com (Postfix) with ESMTP id BD4A41A03E2 for <rtcweb@ietf.org>; Wed, 9 Apr 2014 20:58:28 -0700 (PDT)
Received: from ppp118-209-252-214.lns20.mel6.internode.on.net ([118.209.252.214]:57180 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 1WY685-0001qD-5G for rtcweb@ietf.org; Thu, 10 Apr 2014 13:58:21 +1000
Message-ID: <534616DC.7090800@nteczone.com>
Date: Thu, 10 Apr 2014 13:58:20 +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
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/cLO2LR-4IjpNNTLAOZxFEVcIXnw
Subject: [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: Thu, 10 Apr 2014 03:58:33 -0000

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