Documentation ¶
Index ¶
- func Broadcast(message interface{}, ignoreId string)
- func Close() error
- func Publish(channel string, message interface{}, ignoreId string)
- func SendMessage(clientId, channel string, message interface{}) bool
- func Subcribe(clientId string, channel string) bool
- func Unsubcribe(clientId string, channel string) bool
- type Channel
- type Client
- func (c *Client) Channels() []*Channel
- func (c *Client) Clear()
- func (c *Client) Close()
- func (c *Client) Read()
- func (c *Client) SendMessage(message []byte)
- func (c *Client) Subscribe(channel string)
- func (c *Client) Subscribers(channels []string)
- func (c *Client) Unsubscribe(channel string)
- func (c *Client) Unsubscribers(channels []string)
- func (c *Client) Write()
- type Conn
- type Hub
- func (hub *Hub) Broadcast(message interface{}, ignoreId string)
- func (hub *Hub) GetSubscribers(channel string) []*Client
- func (hub *Hub) Publish(channel string, message interface{}, ignoreId string)
- func (hub *Hub) Run()
- func (hub *Hub) SendMessage(clientId, channel string, message interface{}) bool
- func (hub *Hub) Subcribe(clientId string, channel string) bool
- func (hub *Hub) Unsubcribe(clientId string, channel string) bool
- type WsMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendMessage ¶
func Unsubcribe ¶
Types ¶
type Client ¶
func GetClients ¶
func GetClients() []*Client
func GetSubscribers ¶
func (*Client) SendMessage ¶
func (*Client) Subscribers ¶
func (*Client) Unsubscribe ¶
func (*Client) Unsubscribers ¶
type Hub ¶
type Hub struct { Id string // contains filtered or unexported fields }
func (*Hub) GetSubscribers ¶
func (*Hub) SendMessage ¶
Click to show internal directories.
Click to hide internal directories.