Documentation ¶
Overview ¶
Package switchboard contains logic for routing audio data among channels and their clients.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoChannel is the error returned when performing operations on a channel that // does not exist ErrNoChannel = errors.New("no channel") // ErrUserAlreadyInChannel is the error returned when attempting to move a user // into a channel they are already in. ErrUserAlreadyInChannel = errors.New("user already in channel") )
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct {
// contains filtered or unexported fields
}
The Channel type represents a collection of clients all communicating.
func (*Channel) Join ¶
Join a channel under a given name. Returns ErrUserAlreadyInChannel if a user already exists within the channel.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
The Client type represents a single client communicating via the switchboard.
type SwitchBoard ¶
type SwitchBoard struct {
// contains filtered or unexported fields
}
The SwitchBoard type is used to route audio data between clients in various channels.
Click to show internal directories.
Click to hide internal directories.