graphic-pixi/lib/message/MqttBroker.d.ts
2024-10-08 14:58:19 +08:00

15 lines
594 B
TypeScript

import mqtt from 'mqtt';
import { HandleMessage, MessageClient } from './BasicMessageClient';
import { CompleteMessageCliOption } from './MessageBroker';
export declare class MqttMsgClient extends MessageClient {
cli: mqtt.MqttClient;
retryTimes: number;
subMsgHandler: Map<string, HandleMessage>;
constructor(options: CompleteMessageCliOption);
subscribe(destination: string, handle: HandleMessage): boolean;
unsubscribe0(destination: string): void;
get connected(): boolean;
close(): void;
publishMessage(destination: string, message: Uint8Array): void;
}