Documentation ¶
Index ¶
Constants ¶
View Source
const ( ChannelBinary = byte(websocket.BinaryMessage) ChannelText = byte(websocket.TextMessage) )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Conn ¶
Conn wraps a *gorilla/websocket.Conn to fit the msg package framework. Only binary and text messages are handled.
func (*Conn) Listen ¶
Listen routes incoming messages according to their type. If no target has been specified for a channel, the messages from that channel will be discarded. Returns on error, or when closed. In either case, the websocket is no longer usable. In particular, a chained ReaderTaker should not return an error when the connection should be kept alive.
An active Listen loop is necessary in order to drain incoming messages.
func (*Conn) ReaderChain ¶
func (x *Conn) ReaderChain(ch byte, dst msg.ReaderTaker) error
Should not be called during an active Listen loop.
Click to show internal directories.
Click to hide internal directories.