Skip to content
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

Specify how to handle invalid data channel IDs, or lack of IDs. #847

Merged

Conversation

taylor-b
Copy link
Contributor

@taylor-b taylor-b commented Oct 1, 2016

Fixes issue #746.

For an ID of 65535, createDataChannel will throw an exception. If
it's determined that an ID is invalid for any other reason (such as
shortage of negotiated SCTP streams), or if no more valid IDs are
available when the user agent tries to pick an ID, the data channel will
fire an "error" event and be closed.

For now, I'm leaving the actual error as a "NetworkError", since I
think we need to separately decide how error events on data channels
work (see issue #846).

Fixes issue w3c#746.

For an ID of 65535, createDataChannel will throw an exception. If
it's determined that an ID is invalid for any other reason (such as
shortage of negotiated SCTP streams), or if no more valid IDs are
available when the user agent tries to pick an ID, the data channel will
fire an "error" event and be closed.

For now, I'm leaving the actual error as a "NetworkError", since I
think we need to separately decide how error events on data channels
work (see issue w3c#846).
Copy link
Contributor

@pthatcherg pthatcherg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than that phrase, everything looks good.

negotiated by the [[!RTCWEB-DATA]] implementations, or in the case where
the user agent generates an id according to [[!RTCWEB-DATA-PROTOCOL]], no
more IDs may be available. When the user agent determines that an
<code><a>RTCDataChannel</a></code>'s <a>underlying data transport</a>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's an "underlying data transport"? Why not just say that an ID could not be allocated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's an "underlying data transport"?

My assumption was that it refers to a DataChannel as defined by RTCWEB-DATA.

Why not just say that an ID could not be allocated?

I wanted to be as specific as possible (by providing examples), but also use terminology consistent with the rest of this section. I think "the underlying data transport cannot be created" accomplishes that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants