Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientHandler ¶
type ClientSpawner ¶
type ClientSpawner func(HTTPObjects) ClientHandler
ClientSpawner creates a new client handler
type HTTPObjects ¶
type Handler ¶
func NewHandler ¶
func NewHandler(log *zap.Logger, clientSpawner ClientSpawner) *Handler
NewHandler creates a new handler. Takes a logger and a client spawner function. The spawner will be called for every new client connection.
func (*Handler) Broadcast ¶
func (h *Handler) Broadcast(from ClientHandler, messageType websocket.MessageType, data []byte)
Click to show internal directories.
Click to hide internal directories.