Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // BufferSize holds the queue size for broadcasting channels. BufferSize = 100 // Broadcast receives messages to be broadcasted into global namespace. Broadcast chan string // ToChan broadcasting ToChan chan M )
Functions ¶
Types ¶
type Client ¶
type Client struct { Raw *glue.Socket Channels *sync.Map // Channels map[string]*glue.Channel User *user.User Read chan SocketEvent // contains filtered or unexported fields }
Client contains a message to be broadcasted to a channel
type SocketEvent ¶
type SocketEvent struct { Event string `json:"event"` Params map[string]interface{} `json:"params"` }
func (SocketEvent) Encode ¶
func (ev SocketEvent) Encode() string
Click to show internal directories.
Click to hide internal directories.