Interface Socket

Hierarchy

Index

Properties

Methods

Properties

public _fd: any

public _ioevents: any

public _receiveMore: any

public _subscribe: any

public _unsubscribe: any

public affinity: any

public hwm: any

public identity: any

public last_endpoint: any

public linger: any

public mcast_loop: any

public rate: any

public rcvbuf: any

public reconnect_ivl: any

public recovery_ivl: any

public sndbuf: any

public swap: any

Methods

public backlog(): any

Returns

any

public bind(addr: string, callback: (error: string) => void): Socket

Async bind.

Emits the "bind" event.

Parameters

  • addr: string

    Socket address

  • callback: (error: string) => void

Returns

Socket

public bindSync(addr: string): Socket

Sync bind.

Parameters

  • addr: string

    Socket address

Returns

Socket

public close(): Socket

Close the socket.

Returns

Socket

public connect(addr: string): Socket

Connect to addr.

Parameters

  • addr: string

    Connection address

Returns

Socket

public disconnect(addr: string): Socket

Disconnect from addr.

Parameters

  • addr: string

    The address

Returns

Socket

public getsocketopt(opt: number): any

Get socket opt.

Parameters

  • opt: number

    Option number

Returns

any

public getsocketopt(opt: string): any

Get socket opt.

Parameters

  • opt: string

    Option string

Returns

any

public send(msg: string, flags?: number): Socket

Send the given msg.

Parameters

  • msg: string

    The message

  • flags?: number optional

    Message flags

Returns

Socket

public send(msg: ArrayBuffer, flags?: number): Socket

Send the given msg.

Parameters

  • msg: ArrayBuffer

    The message

  • flags?: number optional

    Message flags

Returns

Socket

public send(msg: Array<any>, flags?: number): Socket

Send the given msg.

Parameters

  • msg: Array<any>

    The message

  • flags?: number optional

    Message flags

Returns

Socket

public setsocketopt(opt: number, val: any): Socket

Set opt to val.

Parameters

  • opt: number

    Option

  • val: any

    Value

Returns

Socket

public setsocketopt(opt: string, val: any): Socket

Set opt to val.

Parameters

  • opt: string

    Option

  • val: any

    Value

Returns

Socket

public subscribe(filter: string): Socket

Subscribe with the given filter.

Parameters

  • filter: string

    The filter

Returns

Socket

public unsubscribe(filter: string): Socket

Unsubscribe with the given filter.

Parameters

  • filter: string

    The filter

Returns

Socket