Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MQTTEventClient

Hierarchy

  • MQTTEventClient

Implements

Index

Constructors

constructor

  • new MQTTEventClient(brokerUrl: string, opts?: IClientOptions): MQTTEventClient
  • Parameters

    • brokerUrl: string
    • Optional opts: IClientOptions

    Returns MQTTEventClient

Methods

dispose

  • dispose(): Promise<void>
  • Returns Promise<void>

onError

  • onError(errorHandler: (err: Error) => void): Promise<void>
  • Parameters

    • errorHandler: (err: Error) => void
        • Parameters

          Returns void

    Returns Promise<void>

publish

  • publish<T>(topic: string, message: T): Promise<void>
  • Type parameters

    • T

    Parameters

    • topic: string
    • message: T

    Returns Promise<void>

subscribe

  • subscribe<T>(topic: string, callback: (message: T) => void): Promise<void>
  • Type parameters

    • T

    Parameters

    • topic: string
    • callback: (message: T) => void
        • (message: T): void
        • Parameters

          • message: T

          Returns void

    Returns Promise<void>

waitForReady

  • waitForReady(): Promise<boolean>

Generated using TypeDoc