Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
Connection represents a websocket connection
type Hub ¶
type Hub struct { Rooms map[string]map[*Connection]bool Broadcast chan Message Register chan Subscription Unregister chan Subscription }
Hub holds the websocket rooms and handels subscription
type Subscription ¶
type Subscription struct { Hub *Hub Conn *Connection Room string }
Subscription represents a websocket client subscription
Click to show internal directories.
Click to hide internal directories.