Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blaster ¶
type Blaster struct {
// contains filtered or unexported fields
}
Blaster contains info about the WebSocket blaster
func GetBlaster ¶
GetBlaster returns a new Blaster
func (*Blaster) GetReadBuffer ¶
func (b *Blaster) GetReadBuffer() *MessageBuffer
GetReadBuffer returns pointer to the ReadBuffer
func (*Blaster) GetWSHandler ¶
func (b *Blaster) GetWSHandler() func(w http.ResponseWriter, r *http.Request)
GetWSHandler returns a HTTP handler function for the websocket
func (*Blaster) Run ¶
func (b *Blaster) Run()
Run starts the HTTP and WS process. Run does not return
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a middleman between the websocket connection and the hub.
type Hub ¶
type Hub struct { // Buffer holding messages from Clients ReadBuffer *MessageBuffer // contains filtered or unexported fields }
Hub maintains the set of active connections and broadcasts messages to the connections.
type MessageBuffer ¶
MessageBuffer holds incoming messages from clients
Click to show internal directories.
Click to hide internal directories.