@ac-essentials/misc-util
    Preparing search index...

    Interface TcpClientEvents

    Event map for TcpClient socket-specific events.

    interface TcpClientEvents {
        close: [hadError: boolean];
        connect: [];
        connectionAttempt: [endpoint: InetEndpoint];
        connectionAttemptFailed: [endpoint: InetEndpoint, error: Error];
        connectionAttemptTimeout: [endpoint: InetEndpoint];
        error: [error: Error];
        lookup: [err: Error | null, address: InetAddress, host: string];
        ready: [];
        timeout: [];
    }
    Index

    Properties

    close: [hadError: boolean]

    Emitted once the socket is fully closed.

    connect: []

    Emitted when a socket connection is successfully established.

    connectionAttempt: [endpoint: InetEndpoint]

    Emitted when a new connection attempt is started. May be emitted multiple times if family autoselection is enabled.

    connectionAttemptFailed: [endpoint: InetEndpoint, error: Error]

    Emitted when a connection attempt failed. May be emitted multiple times if family autoselection is enabled.

    connectionAttemptTimeout: [endpoint: InetEndpoint]

    Emitted when a connection attempt timed out. May be emitted multiple times if family autoselection is enabled.

    error: [error: Error]

    Emitted when an error occurs on the socket.

    lookup: [err: Error | null, address: InetAddress, host: string]

    Emitted after resolving the host name but before connecting.

    ready: []

    Emitted when a socket is ready to be used. Triggered immediately after 'connect'.

    timeout: []

    Emitted if the socket times out from inactivity. The connection is not automatically severed.