pamoja for TypeScript - v0.2.0
    Preparing search index...

    One in-process link to a broker.

    Index
    • Marks this link connected so it will carry traffic.

      Returns Promise<void>

    • Marks this link disconnected, so sends over it fail.

      Returns Promise<void>

    • Whether this link is connected.

      Returns Promise<boolean>

    • Waits for the next message on a subscribed topic. A connected link never ends on its own, so without a limit this waits until a message arrives. Rejects when the link is not connected.

      Parameters

      • OptionaltimeoutMs: number | null

        how long to wait before rejecting; a message that arrives later waits for the next receive.

      Returns Promise<coap.TransportMessage | null>

    • Publishes a payload to a topic on the broker: bytes, or text such as a reading written out.

      Parameters

      • topic: string
      • payload: string | Buffer<ArrayBufferLike>

      Returns Promise<void>

    • Subscribes this link to a topic.

      Parameters

      • topic: string

      Returns Promise<void>