Options
All
  • Public
  • Public/Protected
  • All
Menu

Class HttpClientConnectionManager

Creates, manages, and vends connections to a given host/port endpoint

Hierarchy

  • NativeResource
    • HttpClientConnectionManager

Index

Constructors

constructor

  • Parameters

    • bootstrap: ClientBootstrap

      Client bootstrap to use when initiating socket connections

    • host: string

      Host to connect to

    • port: number

      Port to connect to on host

    • max_connections: number

      Maximum number of connections to pool

    • initial_window_size: number

      Optional initial window size

    • socket_options: SocketOptions

      Socket options to use when initiating socket connections

    • Optional tls_opts: TlsConnectionOptions

      Optional TLS connection options

    • Optional proxy_options: HttpProxyOptions

      Optional proxy options

    Returns HttpClientConnectionManager

Properties

Readonly bootstrap

bootstrap: ClientBootstrap

Client bootstrap to use when initiating socket connections

Readonly host

host: string

Host to connect to

Readonly initial_window_size

initial_window_size: number

Optional initial window size

Readonly max_connections

max_connections: number

Maximum number of connections to pool

Readonly port

port: number

Port to connect to on host

Optional Readonly proxy_options

proxy_options: HttpProxyOptions

Optional proxy options

Readonly socket_options

socket_options: SocketOptions

Socket options to use when initiating socket connections

Optional Readonly tls_opts

Optional TLS connection options

Methods

acquire

  • Vends a connection from the pool

    Returns Promise<HttpClientConnection>

    A promise that results in an HttpClientConnection. When done with the connection, return it via release

close

  • close(): void
  • Closes all connections and rejects all pending requests

    Returns void

native_handle

  • native_handle(): any
  • Returns any

release

  • Returns an unused connection to the pool

    Parameters

    Returns void

Generated using TypeDoc