On 06/23/2015 10:38 PM, Peter Thatcher wrote:
Does DtlsTransport really have a "disconnected"/retrying state? I guess we could make it "disconnected" any time the underlying IceTransport is disconnected, but that adds complexity. What value do we gain to make it worthwhile?
[BA] I think there is no "disconnected" state in DtlsTransport. Here is the proposed definition of the various states in ORTC API:
4.7 enum RTCDtlsTransportState
RTCDtlsTransportState indicates the state of the DTLS transport.
enum RTCDtlsTransportState {
"new<http://internaut.com:8080/~baboba/ortc/ortc-7-03-2015.html#idl-def-RTCDtlsTransportState.new>",
"connecting<http://internaut.com:8080/~baboba/ortc/ortc-7-03-2015.html#idl-def-RTCDtlsTransportState.connecting>",
"connected<http://internaut.com:8080/~baboba/ortc/ortc-7-03-2015.html#idl-def-RTCDtlsTransportState.connected>",
"closed<http://internaut.com:8080/~baboba/ortc/ortc-7-03-2015.html#idl-def-RTCDtlsTransportState.closed>",
"failed<http://internaut.com:8080/~baboba/ortc/ortc-7-03-2015.html#idl-def-RTCDtlsTransportState.failed>"
};
Enumeration description
new
The RTCDtlsTransport<http://internaut.com:8080/~baboba/ortc/ortc-7-03-2015.html#idl-def-RTCDtlsTransport> object has been created and has not started negotiating yet.
connecting
DTLS is in the process of negotiating a secure connection. Once a secure connection is negotiated and DTLS-SRTP<http://internaut.com:8080/~baboba/ortc/ortc-7-03-2015.html#dfn-dtls-srtp> has derived keys (but prior to verification of the remote fingerprint, enabled by calling start()), incoming media can flow through.
connected
DTLS has completed negotiation of a secure connection (including DTLS-SRTP<http://internaut.com:8080/~baboba/ortc/ortc-7-03-2015.html#dfn-dtls-srtp> and remote fingerprint verification). Outgoing media can now flow through.
closed
The DTLS connection has been closed intentionally via a call to stop(). Calling transport.stop() will also result in a transition to the "closed" state.
failed
The DTLS connection has been closed as the result of an error (such as a DTLS alert or a failure to validate the remote fingerprint).