Documentation
¶
Index ¶
- Variables
- func ConnInitor(r *http.Request, c engineio.Conn)
- type IWrapper
- type Wrapper
- func (s *Wrapper) Close()
- func (s *Wrapper) Handle(context echo.Context) error
- func (s *Wrapper) OnConnect(nsp string, f func(echo.Context, socketio.Conn) error)
- func (s *Wrapper) OnDisconnect(nsp string, f func(echo.Context, socketio.Conn, string))
- func (s *Wrapper) OnError(nsp string, f func(echo.Context, socketio.Conn, error))
- func (s *Wrapper) OnEvent(nsp, event string, f func(echo.Context, socketio.Conn, string))
- func (s *Wrapper) OnEventAndReturn(nsp, event string, f func(echo.Context, socketio.Conn, string) string)
- func (s *Wrapper) Serve()
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrServerCannotBeNil = errors.New("socket.io server can not be nil") ErrContextCannotBeNil = errors.New("socket.io context can not be nil") )
Functions ¶
Types ¶
type IWrapper ¶
type IWrapper interface { OnConnect(nsp string, f func(echo.Context, socketio.Conn) error) OnDisconnect(nsp string, f func(echo.Context, socketio.Conn, string)) OnError(nsp string, f func(echo.Context, socketio.Conn, error)) OnEvent(nsp, event string, f func(echo.Context, socketio.Conn, string)) Serve() Close() echo.Handler }
Socket.io wrapper interface
type Wrapper ¶
func NewWrapper ¶
Create wrapper and Socket.io server
func NewWrapperWithServer ¶
Create wrapper with exists Socket.io server
func (*Wrapper) OnDisconnect ¶
On Socket.io client disconnect
Click to show internal directories.
Click to hide internal directories.