- From: Lennart Grahl via GitHub <sysbot+gh@w3.org>
- Date: Sat, 21 Apr 2018 23:24:00 +0000
- To: public-webrtc@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:05 UTC