ts-lambda-api - v2.5.3
    Preparing search index...

    Interface AgentOptions

    interface AgentOptions {
        agentKeepAliveTimeoutBuffer?: number;
        autoSelectFamily?: boolean;
        autoSelectFamilyAttemptTimeout?: number;
        blockList?: BlockList;
        defaultPort?: number;
        family?: number;
        hints?: number;
        host?: string;
        keepAlive?: boolean;
        keepAliveInitialDelay?: number;
        keepAliveMsecs?: number;
        localAddress?: string;
        localPort?: number;
        lookup?: LookupFunction;
        maxFreeSockets?: number;
        maxSockets?: number;
        maxTotalSockets?: number;
        noDelay?: boolean;
        port?: number;
        protocol?: string;
        proxyEnv?: ProxyEnv;
        scheduling?: "fifo" | "lifo";
        timeout?: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    agentKeepAliveTimeoutBuffer?: number

    Milliseconds to subtract from the server-provided keep-alive: timeout=... hint when determining socket expiration time. This buffer helps ensure the agent closes the socket slightly before the server does, reducing the chance of sending a request on a socket that’s about to be closed by the server.

    v24.7.0

    1000
    
    autoSelectFamily?: boolean

    v18.13.0

    autoSelectFamilyAttemptTimeout?: number

    v18.13.0

    blockList?: BlockList
    defaultPort?: number

    Default port to use when the port is not specified in requests.

    v24.5.0

    family?: number
    hints?: number
    host?: string
    keepAlive?: boolean

    Keep sockets around in a pool to be used by other requests in the future. Default = false

    keepAliveInitialDelay?: number
    keepAliveMsecs?: number

    When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. Only relevant if keepAlive is set to true.

    localAddress?: string
    localPort?: number
    maxFreeSockets?: number

    Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256.

    maxSockets?: number

    Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity

    maxTotalSockets?: number

    Maximum number of sockets allowed for all hosts in total. Each request will use a new socket until the maximum is reached. Default: Infinity.

    noDelay?: boolean
    port?: number
    protocol?: string

    The protocol to use for the agent.

    v24.5.0

    proxyEnv?: ProxyEnv

    Environment variables for proxy configuration. See Built-in Proxy Support for details.

    v24.5.0

    scheduling?: "fifo" | "lifo"

    Scheduling strategy to apply when picking the next free socket to use.

    lifo

    timeout?: number

    Socket timeout in milliseconds. This will set the timeout after the socket is connected.