Preparing search index...

    Base class for network socket connections providing data transport over local or remote addresses.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    localAddress: Address

    The local address bound to this socket.

    onConnect: signal0<void>

    Signal fired when the socket successfully establishes a connection.

    onData: signal1<Buffer, void>

    Signal fired when data is received on the socket, carrying the received buffer.

    onEnd: signal0<void>

    Signal fired when the remote end signals the end of transmission.

    onError: signal1<number, void>

    Signal fired when a socket error occurs.

    remoteAddress: Address

    The remote address this socket is connected to.

    Methods

    • Closes the socket connection gracefully.

      Returns void

    • Destroys the socket and releases all associated resources immediately.

      Returns void

    • Returns true if the object is of the specified type.

      Parameters

      • type: string

      Returns boolean