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

    Class MqttClient

    An MQTT client transport backed by the native pamoja core.

    Index
    • Connects to the broker and starts the background event loop.

      Returns Promise<void>

    • Closes the connection and stops the background event loop.

      Returns Promise<void>

    • Reports whether the client currently holds an active connection.

      Returns Promise<boolean>

    • Publishes a payload to a topic.

      Parameters

      • topic: string
      • payload: Buffer

      Returns Promise<void>

    • Awaits the next message from any subscribed topic, or null once the connection has ended.

      Returns Promise<MqttMessage | null>

    • Subscribes to a topic filter.

      Parameters

      • topic: string

      Returns Promise<void>