Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChanConn ¶
ChanConn is the connection given to the topic handlers it contains the connection information and the context of the current channel
func (ChanConn) GetChannel ¶
GetChannel gets the fully named channel in the form of "<topic>:<room>"
type Conn ¶
type Conn struct { WS *websocket.Conn Channels map[string]bool InitData map[string]interface{} // contains filtered or unexported fields }
Conn is the wrapped connection for a client
type ConnValidHandler ¶
ConnValidHandler is a callback function for the pre-connect validation step to allow users to specify a handler that allows or denys the wescoket connection based on the request.
type Hub ¶
type Hub struct {
// contains filtered or unexported fields
}
Hub is the struct for the main Hub
func (*Hub) AddConnValidHandler ¶
func (h *Hub) AddConnValidHandler(handle ConnValidHandler)
AddConnValidHandler registers a new connection validation handler
func (*Hub) AddTopicHandler ¶
func (h *Hub) AddTopicHandler(topic string, handler TopicHandler)
AddTopicHandler registers a new TopicHandler with the topic name
Click to show internal directories.
Click to hide internal directories.