Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NetClient

A TCP client.

Multiple connections to different servers can be made using the same instance.

This client supports a configurable number of connection attempts and a configurable delay between attempts.

Hierarchy

  • NetClient

Implements

Index

Methods

close

  • Close the client.

    Any sockets which have not been closed manually will be closed here. The close is asynchronous and may not complete until some time after the method has returned.

    Returns PromiseLike<void>

  • Close the client.

    Any sockets which have not been closed manually will be closed here. The close is asynchronous and may not complete until some time after the method has returned.

    Parameters

    Returns void

connect

  • Open a connection to a server at the specific port and host.

    host can be a valid host name or IP address. The connect is done asynchronously and on success, a NetSocket instance is supplied via the connectHandler instance

    Parameters

    • port: number
    • host: string

    Returns PromiseLike<NetSocket>

  • Open a connection to a server at the specific port and host.

    host can be a valid host name or IP address. The connect is done asynchronously and on success, a NetSocket instance is supplied via the connectHandler instance

    Parameters

    Returns NetClient

  • Open a connection to a server at the specific port and host.

    host can be a valid host name or IP address. The connect is done asynchronously and on success, a NetSocket instance is supplied via the connectHandler instance

    Parameters

    • port: number
    • host: string
    • serverName: string

    Returns PromiseLike<NetSocket>

  • Open a connection to a server at the specific port and host.

    host can be a valid host name or IP address. The connect is done asynchronously and on success, a NetSocket instance is supplied via the connectHandler instance

    Parameters

    Returns NetClient

  • Open a connection to a server at the specific remoteAddress.

    The connect is done asynchronously and on success, a NetSocket instance is supplied via the connectHandler instance

    Parameters

    Returns PromiseLike<NetSocket>

  • Open a connection to a server at the specific remoteAddress.

    The connect is done asynchronously and on success, a NetSocket instance is supplied via the connectHandler instance

    Parameters

    Returns NetClient

  • Open a connection to a server at the specific remoteAddress.

    The connect is done asynchronously and on success, a NetSocket instance is supplied via the connectHandler instance

    Parameters

    Returns PromiseLike<NetSocket>

  • Open a connection to a server at the specific remoteAddress.

    The connect is done asynchronously and on success, a NetSocket instance is supplied via the connectHandler instance

    Parameters

    Returns NetClient

isMetricsEnabled

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

    Returns boolean

updateSSLOptions

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

    Parameters

    Returns PromiseLike<void>

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

    Parameters

    Returns void

Generated using TypeDoc