W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > April 2018

[webrtc-pc] Pull Request: Data channel receive procedure

From: Lennart Grahl via GitHub <sysbot+gh@w3.org>
Date: Sat, 21 Apr 2018 23:23:59 +0000
To: public-webrtc-logs@w3.org
Message-ID: <pull_request.opened-183246941-1524353038-sysbot+gh@w3.org>
lgrahl has just submitted a new pull request for https://github.com/w3c/webrtc-pc:

== Data channel receive procedure ==
This adds steps for receiving a data channel message. Also clarifies that messages can only be received as long as `.readyState` is `open`.

Since implications on the closing procedure aren't trivial, here's an explanation:

1. Let peers A and B have a common data channel
2. B sends data in a tight loop.
3. A enqueues data to send and then closes the channel (which will enqueue to send an outgoing stream reset after all messages have been delivered). A's channel is now in the `closing` state.
    - **Important:** A cannot receive any more messages from B at this point! All incoming data from B will be discarded.
4. B's channel is still in the `open` state until it has received all messages that have been queued by A.
5. After having received all messages by A, B's channel will move into the `closing` state (due to having received an incoming stream reset and acknowledging it). B is allowed to discard any pending outgoing messages (if possible) and will send an outgoing stream reset.
6. A's channel will move into the `closed` state (due to having received acknowledgement for its outgoing stream reset and received an incoming stream reset).
7. B's channel will move into the `closed` state (due to having received acknowledgement for its outgoing stream reset).

Tests for *enqueue messages and close* exist as part of https://github.com/w3c/web-platform-tests/pull/10468.

See https://github.com/w3c/webrtc-pc/pull/1849
Received on Saturday, 21 April 2018 23:24:03 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 6 May 2023 21:19:44 UTC