Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func New ¶
func New(w http.ResponseWriter, r *http.Request, disableOriginCheck bool) (*Connection, error)
func (*Connection) Close ¶
func (c *Connection) Close() error
func (*Connection) On ¶
func (c *Connection) On(cmd string, cb func())
func (*Connection) Run ¶
func (c *Connection) Run() error
func (*Connection) Send ¶
func (c *Connection) Send(msg interface{}) error
type OnCommand ¶
type OnCommand func(cmd string, c *Connection)
Click to show internal directories.
Click to hide internal directories.