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
RTCIceGatherer.close affect on RTCIceTransport / RTCDtlsTransport #208
Comments
Here is the description of iceGatherer.close(): close Calling iceGatherer.close() will also cause iceGatherer.state to transition to "closed" as noted in the description of the "closed" state: closed The definition of the iceTransport.state value of "disconnected" is: disconnected Here is the definition of dtlsTransport.state of "closed" : closed [BA] As a result of the above, if iceGatherer.close() is called, iceGatherer.state transitions to "closed" and the associated IceTransport objects transition to the '"disconnected" state. What if iceTransport.state had previously been "failed"? Should a transition to "disconnected" still occur? The proposed IceTransport state diagram seems to show a potential transition between "failed" and "disconnected", so it seems the answer is "yes". However, dltsTransport.state does not appear to be affected, since calling iceGatherer.close() results in transport.state transitioning to "disconnected" and not "closed". |
Proposed update to definitions of "close" and "closed": close closed Updated definition of "getLocalCandidates" Change: "getLocalCandidates To: "getLocalCandidates |
Also, here is a proposed revision in Section 13.1. Change: "Gathers stats for the given object and reports the result asynchronously. When the getStats() method is invoked, the user agent must queue a task to run the following steps: For RTCDtlsTransport.getStats(), check whether RTCDtlsTransport.start() has been called; if not, throw an InvalidStateError exception. For RTCIceTransport.getStats(), check whether RTCIceTransport.start() has been called; if not, or if RTCIceTransport.stop() has been called, throw an InvalidStateError exception. For RTCRtpSender.getStats(), check whether RTCRtpSender.send(parameters) has been called; if not, throw an InvalidStateError exception. For RTCRtpReceiver.getStats(), check whether RTCRtpReceiver.receive(parameters) has been called; if not, throw an InvalidStateError exception." to: "getStats When the getStats() method is invoked, the user agent must queue a task to run the following steps: Let p be a new promise. For RTCDtlsTransport.getStats(), check whether RTCDtlsTransport.state is "closed"; if so, reject p with an InvalidStateError. For RTCIceGatherer.getStats(), check whether RTCIceGatherer.state is "closed"; if so, reject p with an InvalidStateError. For RTCIceTransport.getStats(), check whether RTCIceTransport.state is "closed"; if so, reject p with an InvalidStateError." |
Added the "failed" state to RTCIceTransportState, as noted in: Issue #199 Added text relating to handling of incoming media packets prior to remote fingerprint verification, as noted in: Issue #200 Added a complete attribute to the RTCIceCandidateComplete dictionary, as noted in: Issue #207 Updated the description of RTCIceGatherer.close() and the "closed" state, as noted in: Issue #208 Updated Statistics API error handling to reflect proposed changes to the WebRTC 1.0 API, as noted in: Issue #214 Updated Section 10 (RTCDtmfSender) to reflect changes in the WebRTC 1.0 API, as noted in: Issue #215 Clarified state transitions due to consent failure, as noted in: Issue #216 Added a reference to [FEC], as noted in: Issue #217
This proposal (.close causes IceTransport.disconnected) makes sense to me. However, I don't think failed -> disconnected makes sense. Peter and I discussed what should happen to DtlsTransport state upon an IceTransport disconnection. I am leaning toward having disconnected on DtlsTransport, but we need to understand exactly what disconnected means in a DtlsTransport context. |
This same question has come up while adding DtlsTransport to WebRTC 1.0: Should DtlsTransport have a "disconnected" state that it goes into when the IceTransport underneath is "disconnected"? If so, then IceGatherer.close should cause DtlsTransport to go into the disconnected state. If not, I think it should stay in the connected state (just as it would in normal ICE disconnects). |
@pthatcher I agree with you. I think it remains connected despite the transport underneath being disconnected since the ice transport disconnection could resolve itself with additional candidates and the dtls transport doesn't need to reassert the connected state after. |
The tradeoff is the following is either: A. Require the application to check both DtlsTransport.state and IceTransport.state to know if everything is connected. This requires more complexity in the app. B. Require the DtlsTransport to know the IceTransport.state to change its state based on the IceTransport.state. This requires more complexity in the implementation. I think if we only have the disconnected state, then I'm inclined to say go with B. But if it becomes a slippery slope where we have to have a lot of duplicate state, I'd prefer A. |
robin-raymond commentedMay 26, 2015
needs to:
(answer this issue on list, see if it is "good enough", think this is already all done in spec)
The text was updated successfully, but these errors were encountered: