Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct { // To Reference an event to broadcast on Ref string // The Websocket Connection Ws *websocket.Conn // A channel to quit on to close the connection Done chan bool }
func (Connection) Close ¶
func (c Connection) Close()
type Handler ¶
type Handler struct { // Channel to Receive the events on Receive chan Event // Store of events being listened for Store map[string]map[*websocket.Conn]*Connection // contains filtered or unexported fields }
func NewEventHandler ¶
func NewEventHandler() *Handler
func (*Handler) BroadcastEvent ¶
func (*Handler) RegisterEvent ¶
func (h *Handler) RegisterEvent(c *Connection)
func (*Handler) UnregisterEvent ¶
func (h *Handler) UnregisterEvent(c Connection)
Click to show internal directories.
Click to hide internal directories.