Documentation
    Preparing search index...

    Options for regular node transports. Nodes handle access, agents, and messages.

    Hierarchy (View Summary)

    Index

    Properties

    agentsReceivedCallback: AgentsReceivedCallback

    Called when agent-info bytes have been received from a peer.

    connectedToRelayCallback?: ConnectedToRelayCallback

    Called when the bootstrap connection to a relay is complete.

    handshakeTimeoutMs?: number

    Timeout in milliseconds for the outbound access handshake response. Defaults to 10_000 ms.

    id?: string

    Optional human-readable identifier attached to log records.

    messageHandler: MessageHandler

    Handler for incoming application messages.

    networkAccessBytes?: NetworkAccessBytes

    Network access bytes sent in handshake responses (and outbound handshakes for nodes).

    Defaults to new Uint8Array([0]) — an empty array breaks the counter-handshake because .send() would be a no-op.

    networkAccessHandler: NetworkAccessHandler

    Handler invoked for every incoming access handshake. Returns true to grant access, false to deny. Denials are sticky for the session.

    peerConnectedCallback: PeerConnectedCallback

    Called when an inbound peer completes the access handshake. Fire-and-forget.

    peerDisconnectedCallback?: PeerDisconnectedCallback

    Called when a peer disconnects. Fire-and-forget.