Hiyve Components - v1.0.0
    Preparing search index...
    Index

    Constructors

    Accessors

    • get sessionId(): number | null

      Returns number | null

    Methods

    • Open the WebTransport connection, read the session:info handshake frame, and start the datagram read loop. Returns the parsed SessionInfo once the server confirms join. Retries transient failures with backoff; surfaces auth failures immediately.

      Returns Promise<SessionInfo>

    • Close the connection, drop subscribers, and release the writer. Idempotent.

      Returns void

    • Fire-and-forget publish. The 4-byte sender session ID is stamped by the server, so the wire payload is just the encoded envelope.

      Type Parameters

      • T

      Parameters

      • topic: string
      • payload: T

      Returns void

    • Subscribe to a topic. Returns an unsubscribe function. Multiple subscribers per topic are supported and dispatched in registration order.

      Type Parameters

      • T

      Parameters

      Returns () => void