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

    Type Alias StreamSocketEvents

    Event map for StreamSocket lifecycle events.

    These correspond to the core net.Socket events that are meaningful for any stream-oriented connection, regardless of the underlying transport (TCP, Unix domain socket, etc.).

    type StreamSocketEvents = {
        close: [hadError: boolean];
        connect: [];
        error: [error: IError];
        ready: [];
        timeout: [];
    }
    Index

    Properties

    close: [hadError: boolean]

    Emitted once the socket has been fully closed.

    After this event the socket is no longer usable.

    connect: []

    Emitted when the socket connection is successfully established.

    This maps to the underlying net.Socket "connect" event.

    error: [error: IError]

    Emitted when an error occurs on the underlying socket.

    After this event the implementation will typically attempt to close the socket and then emit StreamSocketEvents.close.

    ready: []

    Emitted when the socket is ready for I/O.

    On Node.js this is typically fired immediately after "connect", once the internal initialization is complete.

    timeout: []

    Emitted if the socket times out from inactivity.

    The underlying connection is not automatically closed; it is up to the caller to decide whether to end or destroy the socket.