Documentation
¶
Overview ¶
Package server implements a basic webrtc server layer
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Log *logging.Logger WebRtc IWebRtc EstablishSessionTimeout time.Duration ICEServers []ICEServer ExitOnCoordinatorClose bool MaxPeers uint16 WebRtcLogLevel zerolog.Level OnNewPeerHdlr func(p *Peer) error OnPeerDisconnectedHdlr func(p *Peer) }
Config represents the server config
type DataChannel ¶
type DataChannel = pion.DataChannel
DataChannel is the top level pion's data channel
type DataChannelState ¶
type DataChannelState = pion.DataChannelState
DataChannelState is the pion's data channel state
type ICECandidateType ¶
type ICECandidateType = pion.ICECandidateType
ICECandidateType is the pion's ICECandidateType
type ICEConnectionState ¶
type ICEConnectionState = pion.ICEConnectionState
ICEConnectionState is the pion's ICEConnectionState
type IWebRtc ¶
type IWebRtc interface {
// contains filtered or unexported methods
}
IWebRtc is this module interface
type Peer ¶
type Peer struct { Alias uint64 Conn *PeerConnection Log logging.Logger // contains filtered or unexported fields }
Peer represents a server connection
type PeerConnection ¶
type PeerConnection = pion.PeerConnection
PeerConnection represents the webrtc connection
type ReadWriteCloser ¶
type ReadWriteCloser = datachannel.ReadWriteCloser
ReadWriteCloser is the detached datachannel pion's interface for read/write
type Server ¶
type Server struct { Alias uint64 // contains filtered or unexported fields }
Server ...
func (*Server) ConnectCoordinator ¶
func (s *Server) ConnectCoordinator(url string) (*protocol.WelcomeMessage, error)
ConnectCoordinator establish a connection with the coordinator
func (*Server) ConnectPeer ¶
ConnectPeer initiates the peer connection, it will send a connect message thought the coordinator and create the peer itself
func (*Server) ProcessControlMessages ¶
func (s *Server) ProcessControlMessages()
ProcessControlMessages starts the control message processor