Documentation ¶
Index ¶
- func Uuid() string
- type Connection
- type Hub
- func (h *Hub) Listen(c *Connection, messageHandler func(messageType int, message []byte)) error
- func (h *Hub) Open(channel string, res http.ResponseWriter, req *http.Request) (*Connection, error)
- func (h *Hub) RemoveConn(c *Connection)
- func (h *Hub) SetDefault()
- func (h *Hub) WriteOnChannel(channel string, message []byte)
- func (h *Hub) WriteOnConn(c *Connection, messageType int, message []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Connection ¶
type Hub ¶
type Hub struct { Upgrader *websocket.Upgrader WriteWait time.Duration PongWait time.Duration PingPeriod time.Duration MaxMessageSize int64 // contains filtered or unexported fields }
func (*Hub) Listen ¶
func (h *Hub) Listen(c *Connection, messageHandler func(messageType int, message []byte)) error
func (*Hub) Open ¶
func (h *Hub) Open(channel string, res http.ResponseWriter, req *http.Request) (*Connection, error)
func (*Hub) RemoveConn ¶
func (h *Hub) RemoveConn(c *Connection)
func (*Hub) SetDefault ¶
func (h *Hub) SetDefault()
func (*Hub) WriteOnChannel ¶
func (*Hub) WriteOnConn ¶
func (h *Hub) WriteOnConn(c *Connection, messageType int, message []byte) error
Click to show internal directories.
Click to hide internal directories.