[webrtc-pc] RTCPeerConnection.close procedure: Data Channel & SCTP questions

lgrahl has just created a new issue for https://github.com/w3c/webrtc-pc:

== RTCPeerConnection.close procedure: Data Channel & SCTP questions ==
I have a bunch of questions for the closing procedure of `RTCPeerConnection.close`:

1. The `ReadyState` of the `RTCDataChannel`s is updated to `closed`. I'm assuming here this means the data channels will be closed in an abrupt manner. If you don't think this is the case, ignore the sub-steps below.
    1. Should we add a note that this means data channels will be closed abruptly and the *closing* procedure is **not** invoked?
        (I think we should)
    2. Does that mean the `onclose` event will fire? Related: https://github.com/w3c/webrtc-pc/issues/1799
        (I don't think it needs to since we have `RTCSctpTransport.onstatechange`)
    3. Is the *closed* procedure invoked (see below)? Should it fire the `RTCError` event?
     
         > 2 . Set channel's [[ReadyState]] slot to closed.
         > 3 . Fire an RTCError event at channel with errorDetail set to "data-channel-failure".
         > 4 . Fire a simple event named close at channel.

        (I believe it should invoke the *closed* procedure and reference that. And I think it should also fire since that's a non-graceful close.)
2. The `SCTPTransportState` slot is updated to `closed`. Does that mean the SCTP association [will be aborted or terminated gracefully](https://tools.ietf.org/html/draft-ietf-rtcweb-data-channel-13#section-6.2)?

(I think it should state to send an SCTP ABORT chunk and be done with it since all data channels have already been closed non-gracefully and therefore all data in-flight is lost.)

Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1821 using your GitHub account

Received on Saturday, 31 March 2018 21:35:33 UTC