Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a middleman between the websocket connection and the hub.
type HandlerFunc ¶
HandlerFunc is used for callbacks sends a list of channels the client registered to and a return channel
type Hub ¶
type Hub struct {
// contains filtered or unexported fields
}
Hub maintains the set of active clients and broadcasts messages to the clients.
func (*Hub) OnRegister ¶
func (h *Hub) OnRegister(f HandlerFunc)
OnRegister calls a handler when a client registers.
Click to show internal directories.
Click to hide internal directories.