trakteerjs
    Preparing search index...

    Interface ServerOptions<Request, Response>

    interface ServerOptions<
        Request extends typeof IncomingMessage = typeof IncomingMessage,
        Response extends typeof ServerResponse = typeof ServerResponse,
    > {
        connectionsCheckingInterval?: number;
        highWaterMark?: number;
        IncomingMessage?: Request;
        insecureHTTPParser?: boolean;
        joinDuplicateHeaders?: boolean;
        keepAlive?: boolean;
        keepAliveInitialDelay?: number;
        keepAliveTimeout?: number;
        maxHeaderSize?: number;
        noDelay?: boolean;
        requestTimeout?: number;
        ServerResponse?: Response;
        uniqueHeaders?: (string | string[])[];
    }

    Type Parameters

    Index

    Properties

    connectionsCheckingInterval?: number

    Sets the interval value in milliseconds to check for request and headers timeout in incomplete requests.

    30000
    
    highWaterMark?: number

    Optionally overrides all sockets' readableHighWaterMark and writableHighWaterMark. This affects highWaterMark property of both IncomingMessage and ServerResponse. Default:

    stream.getDefaultHighWaterMark().

    v20.1.0

    IncomingMessage?: Request

    Specifies the IncomingMessage class to be used. Useful for extending the original IncomingMessage.

    insecureHTTPParser?: boolean

    Use an insecure HTTP parser that accepts invalid HTTP headers when true. Using the insecure parser should be avoided. See --insecure-http-parser for more information.

    false
    
    joinDuplicateHeaders?: boolean

    It joins the field line values of multiple headers in a request with , instead of discarding the duplicates.

    false
    

    v18.14.0

    keepAlive?: boolean

    If set to true, it enables keep-alive functionality on the socket immediately after a new incoming connection is received, similarly on what is done in socket.setKeepAlive([enable][, initialDelay]).

    false
    

    v16.5.0

    keepAliveInitialDelay?: number

    If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket.

    0
    

    v16.5.0

    keepAliveTimeout?: number

    The number of milliseconds of inactivity a server needs to wait for additional incoming data, after it has finished writing the last response, before a socket will be destroyed.

    Server.keepAliveTimeout for more information.

    5000
    

    v18.0.0

    maxHeaderSize?: number

    Optionally overrides the value of --max-http-header-size for requests received by this server, i.e. the maximum length of request headers in bytes.

    16384
    

    v13.3.0

    noDelay?: boolean

    If set to true, it disables the use of Nagle's algorithm immediately after a new incoming connection is received.

    true
    

    v16.5.0

    requestTimeout?: number

    Sets the timeout value in milliseconds for receiving the entire request from the client.

    Server.requestTimeout for more information.

    300000
    

    v18.0.0

    ServerResponse?: Response

    Specifies the ServerResponse class to be used. Useful for extending the original ServerResponse.

    uniqueHeaders?: (string | string[])[]

    A list of response headers that should be sent only once. If the header's value is an array, the items will be joined using ; .