Versions in this module Expand all Collapse all v1 v1.1.0 Jul 27, 2023 Changes in this version type Parser + Encode func(any) ([]byte, error) v1.0.0 Jul 25, 2023 Changes in this version + const UID + var RESERVED_EVENTS = types.NewSet("connect", "connect_error", "disconnect", "disconnecting", "newListener", ...) + type BroadcastFlags struct + Compress bool + Volatile bool + type BroadcastOperator struct + func NewBroadcastOperator(redisClient *redis.Client, broadcastOptions *BroadcastOptions, ...) *BroadcastOperator + func (b *BroadcastOperator) Compress(compress bool) *BroadcastOperator + func (b *BroadcastOperator) DisconnectSockets(state bool) + func (b *BroadcastOperator) Emit(ev string, args ...any) error + func (b *BroadcastOperator) Except(room ...socket.Room) *BroadcastOperator + func (b *BroadcastOperator) In(room ...socket.Room) *BroadcastOperator + func (b *BroadcastOperator) SocketsJoin(room ...socket.Room) + func (b *BroadcastOperator) SocketsLeave(room ...socket.Room) + func (b *BroadcastOperator) To(room ...socket.Room) *BroadcastOperator + func (b *BroadcastOperator) Volatile() *BroadcastOperator + type BroadcastOptions struct + BroadcastChannel string + Nsp string + Parser Parser + RequestChannel string + type Emitter struct + func NewEmitter(redisClient *redis.Client, opts *EmitterOptions, nsps ...string) *Emitter + func (e *Emitter) Compress(compress bool) *BroadcastOperator + func (e *Emitter) DisconnectSockets(state bool) + func (e *Emitter) Emit(ev string, args ...any) error + func (e *Emitter) Except(room ...socket.Room) *BroadcastOperator + func (e *Emitter) In(room ...socket.Room) *BroadcastOperator + func (e *Emitter) Of(nsp string) *Emitter + func (e *Emitter) ServerSideEmit(args ...any) error + func (e *Emitter) SocketsJoin(room ...socket.Room) + func (e *Emitter) SocketsLeave(room ...socket.Room) + func (e *Emitter) To(room ...socket.Room) *BroadcastOperator + func (e *Emitter) Volatile() *BroadcastOperator + type EmitterOptions struct + func DefaultEmitterOptions() *EmitterOptions + func (s *EmitterOptions) Assign(data EmitterOptionsInterface) (EmitterOptionsInterface, error) + func (s *EmitterOptions) GetRawKey() *string + func (s *EmitterOptions) GetRawParser() Parser + func (s *EmitterOptions) Key() string + func (s *EmitterOptions) Parser() Parser + func (s *EmitterOptions) SetKey(key string) + func (s *EmitterOptions) SetParser(parser Parser) + type EmitterOptionsInterface interface + GetRawKey func() *string + GetRawParser func() Parser + Key func() string + Parser func() Parser + SetKey func(key string) + SetParser func(parser Parser) + type Packet struct + Close bool + Data any + Opts *PacketOptions + Rooms []socket.Room + Type RequestType + Uid string + type PacketOptions struct + Except []socket.Room + Flags *BroadcastFlags + Rooms []socket.Room + type Parser interface + Encoder func(any) ([]byte, error) + type RequestType byte + const ALL_ROOMS + const REMOTE_DISCONNECT + const REMOTE_FETCH + const REMOTE_JOIN + const REMOTE_LEAVE + const SERVER_SIDE_EMIT + const SOCKETS