reticulum-js
    Preparing search index...

    Class LinkChannelOutlet

    ChannelOutletBase backed by a import("./link.js").Link.

    Adapts the channel to our link's proof model: the link fires a proof event for every validated link-DATA proof (regardless of context). We match proofs to in-flight envelopes by packet hash and arm timeouts with setTimeout.

    Retransmission re-sends the identical encrypted packet bytes (same hash, same proof) rather than re-encrypting, so the receiver's re-proof resolves the original envelope.

    Hierarchy

    • ChannelOutletBase
      • LinkChannelOutlet
    Index
    _earlyDelivered: Set<string> = ...

    Hashes whose proof arrived before send() registered the handle. With a zero-latency (mock) transport the proof round-trip completes inside outlet.send's await — before the handle is stored — so we stash those hashes and reconcile when send() lands.

    _proofListener: (event: CustomEvent<any>) => void
    _sent: Map<string, LinkOutletPacket> = ...
    link: Link
    • Only-if-larger timeout bump used by Channel._updatePacketTimeouts.

      Parameters

      • op: LinkOutletPacket
      • timeoutSeconds: number

      Returns void

    • Re-send the exact wire bytes of a previously-sent packet (identical hash → identical proof). Returns the same handle.

      Parameters

      • op: LinkOutletPacket

      Returns Promise<LinkOutletPacket>

    • Token-encrypt and send a CHANNEL DATA packet. Returns a handle whose hash is the proof-correlation id.

      Parameters

      • raw: Uint8Array<ArrayBufferLike>

      Returns Promise<LinkOutletPacket>

    • Parameters

      • op: LinkOutletPacket
      • callback: ((packet: LinkOutletPacket) => void) | null

      Returns void

    • (Re)arm the timeout for a packet. Each call replaces the prior callback and restarts the countdown at timeoutSeconds.

      Parameters

      • op: LinkOutletPacket
      • callback: ((packet: LinkOutletPacket) => void) | null
      • OptionaltimeoutSeconds: number

      Returns void