Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client represents an individual websocket connection to the server
type Hub ¶
type Hub struct {
Clients map[*Client]bool
Broadcast chan []byte
Register chan *Client
Unregister chan *Client
}
Hub maintains the websocket connection state. Clients communicate with each other via the hub channels
type Message ¶
type Message struct {
Event string `json:"event"`
Data json.RawMessage `json:"data"`
}
Message is the generic JSON message data structure sent between client and server
type Server ¶
Server encapsulates the server's outside connections
func (*Server) Middlewares ¶
func (s *Server) Middlewares()
Middlewares adds middlwares to our HTTP handlers
Click to show internal directories.
Click to hide internal directories.