Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
ID string
Channel chan *Message
Request *http.Request
Writer http.ResponseWriter
Flusher http.Flusher
// contains filtered or unexported fields
}
Client represents a single connection
type Hub ¶
type Hub struct {
// contains filtered or unexported fields
}
Hub manages all connections
func (*Hub) GetClientCount ¶
GetClientCount returns the number of connected clients
func (*Hub) Handle ¶
func (hub *Hub) Handle(w http.ResponseWriter, r *http.Request)
Handle is an HTTP handler for connections
func (*Hub) SendToClient ¶
SendToClient sends a message to a specific client
Click to show internal directories.
Click to hide internal directories.