New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataChannel: negotiated behaviour appears to be not possible to implement #233
Comments
It's my understanding that if {negotiated: true}, then On Mon, Sep 7, 2015 at 7:30 AM, Robin Raymond notifications@github.com
|
Proposed fix is to change the description of "negotiated" in Section 11.6.1 to the following: negotiated of type boolean, , defaulting to false |
What happens if Alice creates Normally Alice's In other words, should Bob's engine disallow creation of a |
Variation: Alice creates a |
On Tue, Sep 15, 2015 at 4:24 PM, Robin Raymond notifications@github.com
If a DataChannel already exists with ID = 5 and an OPEN message comes in This is definitely in the territory of "doctor, it hurts when I do this",
|
On Tue, Sep 15, 2015 at 5:01 PM, Robin Raymond notifications@github.com
All data sent between when the OPEN is sent and the ACK is received must
|
draft-ietf-rtcweb-data-protocol Section 6 says: "All Data Channel Establishment Protocol messages MUST be sent using ordered delivery and reliable transmission." [BA] So even though the data channel might have been created on Alice's side as unreliable and unordered, on Bob's side the SCTP transport will not provide data before the DATA_CHANNEL_OPEN. Robin said: "What happens if Alice creates DataChannel with ID 5 with negotiated = Collision avoidance is addressed in draft-ietf-rtcweb-data-protocol Section 4: To avoid collisions where both sides try to open a Data Channel with |
Assuming the When Attempting to create a new |
… in: Issue #195 Added certificate argument to the RTCDtlsTransport constructor, as noted in: Issue #218 Added the "failed" state to RTCDtlsTransportState, as noted in: Issue #219 Changed getNominatedCandidatePair to getSelectedCandidatePair, as noted in: Issue #220 Added support for WebRTC 1.0 RTCIceCredentialType, as noted in: Issue #222 Clarified behavior of createAssociatedGatherer(), as noted in: Issue #223 Changed spelling from "iceservers" to "iceServers" for consistency with WebRTC 1.0, as noted in: Issue #225 Added support for SCTP port numbers, as noted in: Issue #227 Changed "outbound-rtp" to "outboundrtp" within the Statistics API, as noted in: Issue #229 Changed maxPacketLifetime and maxRetransmits from unsigned short to unsigned long, as noted in: Issue #231 Clarified DataChannel negotiation, as noted in: Issue #233 Added getContributingSources() method, as noted in: Issue #236 Fixes to Examples 5 and 6, as noted in: Issue 237 and Issue #239 Fixed cut and paste errors in Example 11, as noted in: Issue #241
The trouble is that constructing a DataChannel with
negotiated
=true
appears to have a race condition. If the local side constructs withnegotiated
as true, theDATA_CHANNEL_OPEN
message (http://tools.ietf.org/html/draft-ietf-rtcweb-data-protocol-09#section-5.1) is sent to the remote side immediately. This will cause an "ondatachannel" with a new DataChannel event to happen remotely if the remote side did not pre-create a DataChannel with the same ID in advanced to receiving the in-band signalling. The remote side has no way to tell if this newly incoming channel had thenegotiated
flag set to true or not (as thenegotiated
field is not carried in theDATA_CHANNEL_OPEN
message to know). If the remote side pre-creates the object, then it will also send theDATA_CHANNEL_OPEN
and then the local side doesn't know in advance that this is anegotiated
channel. Thus both sides must create the DataChannel while theDATA_CHANNEL_OPEN
is still shuttling over the wire or theondatachannel
event will occur. There appears to be no way to suppress this behaviour.The text was updated successfully, but these errors were encountered: