Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a WebSocket client connection
type Hub ¶
type Hub struct {
// contains filtered or unexported fields
}
Hub maintains active WebSocket connections and broadcasts messages
func (*Hub) ClientCount ¶
ClientCount returns the number of connected clients
func (*Hub) ServeWS ¶
func (h *Hub) ServeWS(w http.ResponseWriter, r *http.Request)
ServeWS handles WebSocket requests from clients
func (*Hub) ServeWSUntil ¶
ServeWSUntil closes an authorized connection at its session's absolute expiry. A zero deadline is reserved for connections that do not use sessions (local demo).
Click to show internal directories.
Click to hide internal directories.