- From: Justin Uberti <juberti@google.com>
- Date: Fri, 15 Jun 2012 17:33:52 -0400
- To: public-webrtc@w3.org
- Message-ID: <CAOJ7v-00pC8rbsAQCEWGqDzLd4Md7BX5gpYPcF4D0QZKEOzAYQ@mail.gmail.com>
Reviewing the latest draft, the meanings of some of the values of PeerState and IceState were unclear. In addition, there was no IceState to indicate a liveness check failure. The following is a proposal to provide clear state information from both PeerState and IceState as well as to notify the application of liveness check failures. If you can't see the state diagrams below, you can view them at https://docs.google.com/document/d/13TYiNSEmFkB7IeNLEJFxI0xMNk8q_LhXE_hbvFbXRTU/edit# . *PeerState enum PeerState { "new", "sent-offer", "received-offer", "sent-pranswer", "received-pranswer", "active", "closed" } "new"<http://dev.w3.org/2011/webrtc/editor/webrtc.html#widl-PeerConnection-NEW> The object was just created, and no descriptions have been set. "sent-offer" A local description, of type "offer", has been supplied. "received-offer" A remote description, of type "offer", has been supplied. "sent-pranswer" A remote description of type "offer" has been supplied and a local description of type "pranswer" has been supplied. "received-pranswer" A local description of type "offer" has been supplied and a remote description of type "pranswer" has been supplied. "active" <http://dev.w3.org/2011/webrtc/editor/webrtc.html#widl-PeerConnection-ACTIVE>(also could be called "open", "stable")<http://dev.w3.org/2011/webrtc/editor/webrtc.html#widl-PeerConnection-ACTIVE> Both local and remote descriptions have been supplied, and the offer-answer exchange is complete. "closed"<http://dev.w3.org/2011/webrtc/editor/webrtc.html#widl-PeerConnection-CLOSED> The connection is closed. Note: "opening" and "closing" have been removed, as they don't reflect any real-world state of the PeerConnection.* * Example: Caller transition: - new PeerConnection(): new - setLocal(offer): sent-offer - setRemote(pranswer): received-pranswer - setRemote(answer): active - close(): closed Callee transition: - new PeerConnection(): new - setRemote(offer): received-offer - setLocal(pranswer): sent-pranswer - setLocal(answer): active - close(): closed ------------------------------ IceState enum IceState { "starting", "checking", "connected", "completed","failed", "disconnected", "closed" } "starting" The ICE Agent is gathering addresses and/or waiting for remote candidates to be supplied. "checking"<http://dev.w3.org/2011/webrtc/editor/webrtc.html#widl-PeerConnection-ACTIVE> The ICE Agent is checking candidate pairs but has not yet found a connection. In addition to checking, it may also still be gathering. "connected"<http://dev.w3.org/2011/webrtc/editor/webrtc.html#widl-PeerConnection-CLOSED> The ICE Agent has found a usable connection for all components but is still checking other candidate pairs to see if there is a better connection. It may also still be gathering. "completed"<http://dev.w3.org/2011/webrtc/editor/webrtc.html#widl-PeerConnection-CLOSED> The ICE Agent has finished gathering and checking and found a connection for all components. "failed"<http://dev.w3.org/2011/webrtc/editor/webrtc.html#widl-PeerConnection-CLOSED> The ICE Agent is finished checking all candidate pairs and failed to find a connection for at least one component. "disconnected" Liveness checks have failed for one or more components. "closed"<http://dev.w3.org/2011/webrtc/editor/webrtc.html#widl-PeerConnection-CLOSED> The ICE Agent has shut down and is no longer responding to STUN requests. Note: "new" has been removed, as such a state no longer exists; "waiting"/"gathering" have been merged into "starting", as gathering is not a well-defined state. Note: these represent more or less the most pessimistic view across all the streams. So “connected” means all components are connected. Example: Caller/callee transition: - new PeerConnection(): Starting - (Starting, remote candidates received): Checking - (Checking, found usable connection): Connected - (Checking, gave up): Failed - (Connected, finished all checks): Completed - (Completed, lost connectivity): Disconnected - (any state, ICE restart occurs): Starting - close(): Closed *
Received on Friday, 15 June 2012 21:34:41 UTC