Meshpocalypse Semantic
    Preparing search index...

    Interface MeshTransport

    Core transport abstraction for the mesh network. All transport implementations (NATS, Null, future MQTT/LoRa) conform to this interface.

    interface MeshTransport {
        connected: boolean;
        close(): Promise<void>;
        connect(config: TransportConfig): Promise<void>;
        publish(subject: string, payload: Uint8Array): Promise<void>;
        request(
            subject: string,
            payload: Uint8Array,
            timeout: number,
        ): Promise<Uint8Array<ArrayBufferLike>>;
        subscribe(subject: string, handler: MessageHandler): Promise<Subscription>;
    }

    Implemented by

    Index

    Properties

    connected: boolean

    Methods

    • Parameters

      • subject: string
      • payload: Uint8Array

      Returns Promise<void>

    • Parameters

      • subject: string
      • payload: Uint8Array
      • timeout: number

      Returns Promise<Uint8Array<ArrayBufferLike>>