API reference
Preparing search index…

TcpListener

Listen for TCP connections and hand them to TcpSocket through accept.

Type hierarchy

Hierarchy (View Summary)

Source & inheritance
Member directory30

Constructors

Properties

Methods

Constructors

Properties

blocking: boolean = true
Source & inheritance
detach?: () => void

Remove event listeners from the current transport.

Source & inheritance
epoch: number = 0
Source & inheritance
failure?: Error
Source & inheritance
transport?: Server

Node listener transport sharing the base-class lifecycle.

Source & inheritance
AnyPort: 0

Let the system assign an available port when binding.

Source & inheritance
Status: typeof SocketStatus = SocketStatus

Socket operation status enumeration.

Source & inheritance
Type: typeof SocketType = SocketType

Socket transport protocol enumeration.

Source & inheritance

Methods

  • Parameters

    check
    () => boolean
    generation
    number

    Returns

    Promise<boolean>
    Source & inheritance
  • Return the latest underlying error, or undefined if none is recorded.

    Returns

    undefined | Error
    Source & inheritance
  • Set whether to wait asynchronously for readability/writability. When false, return NotReady or Partial according to current queue state.

    Parameters

    blocking
    boolean

    Returns

    void
    Source & inheritance

Symbol members

"[socketEvents]": EventEmitter<DefaultEventMap> = ...
Source & inheritance

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0