Documentation
¶
Index ¶
- type Client
- type Conf
- type Hub
- func (h *Hub) AddClient(client *Client)
- func (h *Hub) BroadcastMessage(message string)
- func (h *Hub) BroadcastToClient(payload []byte, targetUserID string)
- func (h *Hub) DeleteClient(client *Client)
- func (h *Hub) HandleCommand(cmd string)
- func (h *Hub) HandleMessage(message string)
- func (h *Hub) RegisterClient(client *Client)
- func (h *Hub) Run()
- func (h *Hub) UnregisterClient(client *Client)
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
}
func MakeClient ¶
func (*Client) Disconnect ¶
func (c *Client) Disconnect()
Unregister self from the hub and close websocket connection.
type Conf ¶
func GetCliOptions ¶
func GetCliOptions() *Conf
type Hub ¶
type Hub struct {
// contains filtered or unexported fields
}
func (*Hub) BroadcastMessage ¶
func (*Hub) BroadcastToClient ¶
func (*Hub) DeleteClient ¶
Removes the client from the hub.
func (*Hub) HandleCommand ¶
func (*Hub) HandleMessage ¶
func (*Hub) RegisterClient ¶
Registers the client by sending the client into the register channel.
func (*Hub) UnregisterClient ¶
Unregisters the client by sending the client into the unregister channel
Click to show internal directories.
Click to hide internal directories.