Documentation ¶
Index ¶
- Variables
- type AckCallback
- type Conn
- type EventPayload
- type Io
- func (s *Io) Close()
- func (s *Io) Emit(event string, agrs ...interface{}) error
- func (s *Io) FiberMiddleware(c *fiber.Ctx) error
- func (s *Io) FiberRoute(router fiber.Router)
- func (s *Io) HttpHandler() http.Handler
- func (s *Io) Middleware(c *fiber.Ctx) error
- func (s *Io) Of(name string) *Namespace
- func (s *Io) OnAuthorization(fn func(params map[string]string) bool)
- func (s *Io) OnConnection(fn connectionEventCallback)
- func (s *Io) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *Io) Server(router fiber.Router)
- func (s *Io) Sockets() []*Socket
- func (s *Io) To(name string) *Room
- type Namespace
- type Room
- type Socket
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorInvalidConnection = errors.New("invalid connection") ErrorUUIDDuplication = errors.New("UUID already exists") )
Functions ¶
This section is empty.
Types ¶
type AckCallback ¶
type AckCallback func(data ...interface{})
type Conn ¶ added in v4.0.6
type Conn struct {
// contains filtered or unexported fields
}
func (*Conn) NextWriter ¶ added in v4.0.6
func (c *Conn) NextWriter(messageType int) (io.WriteCloser, error)
type EventPayload ¶
type EventPayload struct { Name string //event name SID string //socket id Socket *Socket Error error Data []interface{} Ack AckCallback }
type Io ¶
type Io struct {
// contains filtered or unexported fields
}
func (*Io) FiberMiddleware ¶ added in v4.0.7
func (*Io) FiberRoute ¶ added in v4.0.7
func (s *Io) FiberRoute(router fiber.Router)
func (*Io) HttpHandler ¶ added in v4.0.6
func (*Io) Middleware ¶
func (*Io) OnConnection ¶
func (s *Io) OnConnection(fn connectionEventCallback)
type Namespace ¶
type Namespace struct { Name string // contains filtered or unexported fields }
func (*Namespace) OnConnection ¶
func (nps *Namespace) OnConnection(fn connectionEventCallback)
type Room ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.