Documentation ¶
Index ¶
Constants ¶
View Source
const ( ConnectionStateNew = epdiscproto.ConnectionState_NEW ConnectionStateChecking = epdiscproto.ConnectionState_CHECKING ConnectionStateConnected = epdiscproto.ConnectionState_CONNECTED ConnectionStateCompleted = epdiscproto.ConnectionState_COMPLETED ConnectionStateFailed = epdiscproto.ConnectionState_FAILED ConnectionStateDisconnected = epdiscproto.ConnectionState_DISCONNECTED ConnectionStateClosed = epdiscproto.ConnectionState_CLOSED )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionState ¶
type ConnectionState = epdiscproto.ConnectionState
const ( ConnectionStateConnecting ConnectionState = 100 + iota ConnectionStateClosing ConnectionStateCreating ConnectionStateRestarting ConnectionStateIdle ConnectionStateGathering ConnectionStateGatheringLocal // After first remote candidate has been received ConnectionStateGatheringRemote // After first local candidate has been received )
The following connection states are an extension to the states by the ICE RFC in order to mitigate race conditions when handling the pion/ice.Agent. They are mainly used for transitioning between the states above.
type Peer ¶
type Peer struct {
// contains filtered or unexported fields
}
Peer 封装了 Pion ICE Agent 以简化点对点连接的建立
func NewICEAgentWrapper ¶
func NewICEAgentWrapper( logger *zap.Logger, signalingClient signal.Client, stunServer []string, source string, target string, ) (*Peer, error)
NewICEAgentWrapper 创建并返回一个新的 Peer
func (*Peer) AddRemoteCandidate ¶
AddRemoteCandidate 添加远程候选者
func (*Peer) IsControlling ¶
Click to show internal directories.
Click to hide internal directories.