Documentation ¶
Index ¶
- Constants
- type BufferTransportGenerator
- type DataChannelCreated
- type DataChannelEvent
- type DataChannelEventHandler
- type DataChannelEventType
- type DataChannelMessage
- type DataChannelOpen
- type ICENotifier
- type Manager
- func (m *Manager) AddURL(url *ice.URL) error
- func (m *Manager) Close()
- func (m *Manager) DTLSFingerprint() string
- func (m *Manager) SendDataChannelMessage(payload datachannel.Payload, streamIdentifier uint16) error
- func (m *Manager) SendOpenChannelMessage(streamIdentifier uint16, label string) error
- func (m *Manager) SendRTCP(pkt []byte)
- func (m *Manager) SendRTP(packet *rtp.Packet)
- func (m *Manager) Start(isOffer bool, remoteUfrag, remotePwd string) error
Constants ¶
const ( NewDataChannel int = iota + 1 NewMessage )
Enums for DataChannelEventType
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BufferTransportGenerator ¶
BufferTransportGenerator generates a new channel for the associated SSRC This channel is used to send RTP packets to users of pion-WebRTC
type DataChannelCreated ¶
type DataChannelCreated struct { Label string // contains filtered or unexported fields }
DataChannelCreated is emitted when a new DataChannel is created
func (*DataChannelCreated) StreamIdentifier ¶
func (d *DataChannelCreated) StreamIdentifier() uint16
StreamIdentifier returns the streamIdentifier
type DataChannelEvent ¶
type DataChannelEvent interface {
StreamIdentifier() uint16
}
DataChannelEvent is the interface for all events that flow across the DataChannelEventHandler
type DataChannelEventHandler ¶
type DataChannelEventHandler func(DataChannelEvent)
DataChannelEventHandler notifies the RTCPeerConnection of events relating to DataChannels
type DataChannelEventType ¶
type DataChannelEventType int
DataChannelEventType is the enum used to represent different types of DataChannelEvent
type DataChannelMessage ¶
type DataChannelMessage struct { Payload datachannel.Payload // contains filtered or unexported fields }
DataChannelMessage is emitted when a DataChannel receives a message
func (*DataChannelMessage) StreamIdentifier ¶
func (d *DataChannelMessage) StreamIdentifier() uint16
StreamIdentifier returns the streamIdentifier
type DataChannelOpen ¶
type DataChannelOpen struct{}
DataChannelOpen is emitted when all channels should be opened
func (*DataChannelOpen) StreamIdentifier ¶
func (d *DataChannelOpen) StreamIdentifier() uint16
StreamIdentifier returns the streamIdentifier
type ICENotifier ¶
type ICENotifier func(ice.ConnectionState)
ICENotifier notifies the RTCPeerConnection if ICE state has changed
type Manager ¶
Manager contains all network state (DTLS, SRTP) that is shared between ports It is also used to perform operations that involve multiple ports
func NewManager ¶
func NewManager(btg BufferTransportGenerator, dcet DataChannelEventHandler, ntf ICENotifier) (m *Manager, err error)
NewManager creates a new network.Manager
func (*Manager) DTLSFingerprint ¶
DTLSFingerprint generates the fingerprint included in an SessionDescription
func (*Manager) SendDataChannelMessage ¶
func (m *Manager) SendDataChannelMessage(payload datachannel.Payload, streamIdentifier uint16) error
SendDataChannelMessage sends a DataChannel message to a connected peer
func (*Manager) SendOpenChannelMessage ¶
SendOpenChannelMessage sends the message to open a datachannel to the connected peer