Documentation ¶
Index ¶
- Constants
- func HasBinary(dataSlice ...interface{}) bool
- type BroadcastOpts
- type Emitter
- func (emitter *Emitter) Broadcast() *Emitter
- func (emitter *Emitter) Emit(event string, data ...interface{}) (*Emitter, error)
- func (emitter *Emitter) EmitBinary(event string, data ...interface{}) (*Emitter, error)
- func (emitter *Emitter) In(room string) *Emitter
- func (emitter *Emitter) InRooms(room string) *Emitter
- func (emitter *Emitter) Join() *Emitter
- func (emitter *Emitter) Of(namespace string) *Emitter
- func (emitter *Emitter) To(room string) *Emitter
- func (emitter *Emitter) Volatile() *Emitter
- type EmitterOpts
Constants ¶
View Source
const ( UID = "emitter" EVENT = 2 BINARY_EVENT = 5 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BroadcastOpts ¶
type BroadcastOpts struct {
// contains filtered or unexported fields
}
type Emitter ¶
type Emitter struct { Key string *BroadcastOpts // contains filtered or unexported fields }
func NewEmitter ¶
func NewEmitter(opts *EmitterOpts) (*Emitter, error)
Emitter constructor Usage:
SocketIO.NewEmitter(&SocketIO.EmitterOpts{ Host:"localhost", Port:6379, })
func (*Emitter) EmitBinary ¶
send the packet by binary Usage: EmitBinary("event name", []byte{0x01, 0x02, 0x03})
Click to show internal directories.
Click to hide internal directories.