Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NetServer

Represents a TCP server

Hierarchy

  • NetServer

Implements

Index

Methods

actualPort

  • actualPort(): number
  • The actual port the server is listening on. This is useful if you bound the server specifying 0 as port number signifying an ephemeral port

    Returns number

close

  • Like {@link NetServer#close} but supplying a handler that will be notified when close is complete.

    Returns PromiseLike<void>

  • Like {@link NetServer#close} but supplying a handler that will be notified when close is complete.

    Parameters

    Returns void

connectHandler

  • Supply a connect handler for this server. The server can only have at most one connect handler at any one time. As the server accepts TCP or SSL connections it creates an instance of NetSocket and passes it to the connect handler.

    Parameters

    Returns NetServer

connectStream

  • Return the connect stream for this server. The server can only have at most one handler at any one time. As the server accepts TCP or SSL connections it creates an instance of NetSocket and passes it to the connect stream .

    Returns ReadStream<NetSocket>

isMetricsEnabled

  • isMetricsEnabled(): boolean
  • Whether the metrics are enabled for this measured object

    Returns boolean

listen

  • Like {@link NetServer#listen} but providing a handler that will be notified when the server is listening, or fails.

    Returns PromiseLike<NetServer>

  • Like {@link NetServer#listen} but providing a handler that will be notified when the server is listening, or fails.

    Parameters

    Returns NetServer

  • Like {@link NetServer#listen} but providing a handler that will be notified when the server is listening, or fails.

    Parameters

    • port: number
    • host: string

    Returns PromiseLike<NetServer>

  • Like {@link NetServer#listen} but providing a handler that will be notified when the server is listening, or fails.

    Parameters

    Returns NetServer

  • Like {@link NetServer#listen} but providing a handler that will be notified when the server is listening, or fails.

    Parameters

    • port: number

    Returns PromiseLike<NetServer>

  • Like {@link NetServer#listen} but providing a handler that will be notified when the server is listening, or fails.

    Parameters

    Returns NetServer

  • Like {@link NetServer#listen} but providing a handler that will be notified when the server is listening, or fails.

    Parameters

    Returns PromiseLike<NetServer>

  • Like {@link NetServer#listen} but providing a handler that will be notified when the server is listening, or fails.

    Parameters

    Returns NetServer

updateSSLOptions

  • Like {@link NetServer#updateSSLOptions} but supplying a handler that will be called when the update happened (or has failed).

    Parameters

    Returns PromiseLike<void>

  • Like {@link NetServer#updateSSLOptions} but supplying a handler that will be called when the update happened (or has failed).

    Parameters

    Returns void

Generated using TypeDoc