Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter provides a chat service
func NewAdapter ¶
func NewAdapter( signaler string, key string, ice []string, config *AdapterConfig, ctx context.Context, ) *Adapter
NewAdapter creates the adapter
func (*Adapter) SendMessage ¶
SendMessage sends a message to all peers
type AdapterConfig ¶
type AdapterConfig struct { *wrtcconn.NamedAdapterConfig OnSignalerConnect func(string) // Handler to be called when the adapter has connected to the signaler OnPeerConnect func(peerID string, channelID string) // Handler to be called when the adapter has connected to a peer OnPeerDisconnected func(peerID string, channelID string) // Handler to be called when the adapter has disconnected from a peer OnMessage func(Message) // Handler to be called when the adapter has received a message Channels []string // Channels to join }
AdapterConfig configures the adapter
Click to show internal directories.
Click to hide internal directories.