Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SeqpacketServer

SeqpacketServer is used to create a SOCK_SEQPACKET server. Note that sockets of SOCK_SEQPACKET don't works on MacOS and currently SeqpacketServer doesn't work with cluster module, i.e. you can't share a SeqpacketServer across different Node.js processes.

SeqpacketServer is also an EventEmitter and will emit events including:

Event: 'connection':

  • socket SeqpacketSocket
  • bindpath string

Emitted when a new connection is made.

Event: 'error'

  • error Error

Emitted when an error occurs.

Event: 'close'

Emitted when the server closes.

Hierarchy

  • EventEmitter
    • SeqpacketServer

Index

Constructors

Methods

  • address(): string
  • close(): void
  • Stops the server from accepting new connections and keeps existing connections.

    This function is synchronous.

    Returns void

  • listen(bindpath: string, backlog?: number): void
  • Start a server listening for connections on the given path. This function is synchronous.

    Parameters

    • bindpath: string
    • backlog: number = 511

    Returns void

  • ref(): void
  • Reference the server so that it will prevent Node.js process from exiting automatically.

    Returns void

  • unref(): void
  • Unreference the server so that it won't prevent Node.js process from exiting automatically.

    Returns void

Generated using TypeDoc