Documentation ¶
Overview ¶
Package websocket provides the http handler, client and hub for managing the websocket connections of clients using rfoutlet. This is both used to react on commands of a single client as well as to broadcast updates to all clients so that state changes are immediately visible to everybody.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Hub ¶
type Hub struct {
// contains filtered or unexported fields
}
Hub acts as a central registry for connected websocket clients and can be used to broadcast messages to everyone.
func NewHub ¶
func NewHub() *Hub
NewHub creates a new hub for handling communicating between connected websocket clients.
Click to show internal directories.
Click to hide internal directories.