Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // Buffered channel of outbound messages. Send chan request.URLRequest // contains filtered or unexported fields }
Client is a middleman between the websocket connection and the hub.
type Hub ¶
type Hub struct { // Registered clients. Clients map[*Client]bool // Broadcast message to workers. Broadcast chan request.URLRequest // Receive message from workers. Receive chan []byte // Register requests from the clients. Register chan *Client // Unregister requests from clients. Unregister chan *Client }
Hub maintains the set of active clients and broadcasts messages to the clients.
Click to show internal directories.
Click to hide internal directories.