Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Channel ¶
type Channel struct { ID int Type ChannelType Name string Topic string Clients map[int]*Client *sync.Mutex }
func NewChannel ¶
func NewChannel(id int, t ChannelType) *Channel
type ChannelList ¶
type ChannelList []*ChannelListing
func (ChannelList) Len ¶
func (c ChannelList) Len() int
func (ChannelList) Less ¶
func (c ChannelList) Less(i, j int) bool
func (ChannelList) Swap ¶
func (c ChannelList) Swap(i, j int)
type ChannelListing ¶
type ChannelListing struct { ID int Type ChannelType Name string Topic string }
type ChannelType ¶
type ChannelType int
const ( ChannelUnknown ChannelType = 0 ChannelText ChannelType = 1 ChannelVoice ChannelType = 2 )
type Client ¶
type Client struct { ID int Name string Status int Conn *websocket.Conn Connected bool PeerConns map[int]*webrtc.PeerConnection PeerConnLock *sync.Mutex In chan *Message Out chan *Message AudioIn *audio.In AudioOut *audio.Out Channel *Channel Terminated chan bool }
func (*Client) CloseAudio ¶
func (c *Client) CloseAudio()
func (*Client) ClosePeerConn ¶
func (*Client) ClosePeerConns ¶
func (c *Client) ClosePeerConns()
type MessageType ¶
type MessageType int
const ( MessageBinary MessageType = 2 MessagePing MessageType = 101 MessagePong MessageType = 102 MessageCall MessageType = 103 MessageAnswer MessageType = 104 MessageConnect MessageType = 110 MessageJoin MessageType = 111 MessageQuit MessageType = 112 MessageNick MessageType = 113 MessageTopic MessageType = 114 MessageAction MessageType = 115 MessageDisconnect MessageType = 119 MessageChat MessageType = 120 MessageTypingStart MessageType = 121 MessageTypingStop MessageType = 122 MessageTransmitStart MessageType = 123 MessageTransmitStop MessageType = 124 MessageServers MessageType = 130 MessageChannels MessageType = 131 MessageUsers MessageType = 132 )
func (MessageType) String ¶
func (t MessageType) String() string
Click to show internal directories.
Click to hide internal directories.