Setu-TS
    Preparing search index...

    Interface LocalDiagnosticsListenerOptions

    Options for one runtime-owned local diagnostics listener.

    handler receives the NORMALIZED framework request (never a raw socket, web Request, adapter, or server handle) and returns the framework response the listener maps back onto the wire. The protocol logic behind the handler belongs to the local diagnostics connector; the listener only owns the socket.

    0.8.0

    interface LocalDiagnosticsListenerOptions {
        handler: (request: IRequest) => IResponse | Promise<IResponse>;
        onListen?: (address: { hostname: string; port: number }) => void;
        port: number;
    }
    Index
    handler: (request: IRequest) => IResponse | Promise<IResponse>

    Handles one normalized request. Called only after the listener's zero-body and duplicate-header framing checks passed; a refused request never reaches it.

    onListen?: (address: { hostname: string; port: number }) => void

    Announces the bound address, REPLACING whatever banner the underlying server would print itself.

    The listener is a developer-facing devtool port, and a bare Listening on http://127.0.0.1:<port>/ is indistinguishable from the application's own listener — so the connector supplies a line that names the devtool. Omitted, the implementation's default banner stands, which is what a caller without a logger wants: a signal, if not a labelled one.

    port: number

    The TCP port to bind on IPv4 loopback. The implementation accepts only 1024–65535; port 0 (auto-selection) is refused so a session can never be bound to an address nobody agreed to.