From 4885600ecc369aa2e30a65de8dd7a410f13c34df Mon Sep 17 00:00:00 2001 From: heyujie <516346543@qq.com> Date: 星期一, 24 五月 2021 11:25:04 +0800 Subject: [PATCH] 解决app通信问题 --- node_modules/mqtt/types/lib/client-options.d.ts | 47 ++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 44 insertions(+), 3 deletions(-) diff --git a/node_modules/mqtt/types/lib/client-options.d.ts b/node_modules/mqtt/types/lib/client-options.d.ts index 1db9c5f..8c34abc 100644 --- a/node_modules/mqtt/types/lib/client-options.d.ts +++ b/node_modules/mqtt/types/lib/client-options.d.ts @@ -2,6 +2,8 @@ import { Store } from './store' import { QoS } from 'mqtt-packet' +export declare type StorePutCallback = () => void + export interface IClientOptions extends ISecureClientOptions { port?: number // port is made into a number subsequently host?: string // host does NOT include port @@ -86,9 +88,32 @@ /** * the retain flag */ - retain: boolean + retain: boolean, + /* + * properies object of will + * */ + properties?: { + willDelayInterval?: number, + payloadFormatIndicator?: number, + messageExpiryInterval?: number, + contentType?: string, + responseTopic?: string, + correlationData?: Buffer, + userProperties?: Object + } } - transformWsUrl?: (url: string, options: IClientOptions, client: MqttClient) => string + transformWsUrl?: (url: string, options: IClientOptions, client: MqttClient) => string, + properties?: { + sessionExpiryInterval?: number, + receiveMaximum?: number, + maximumPacketSize?: number, + topicAliasMaximum?: number, + requestResponseInformation?: boolean, + requestProblemInformation?: boolean, + userProperties?: Object, + authenticationMethod?: string, + authenticationData?: Buffer + } } export interface ISecureClientOptions { /** @@ -118,12 +143,28 @@ * whether or not mark a message as duplicate */ dup?: boolean + /** + * callback called when message is put into `outgoingStore` + */ + cbStorePut?: StorePutCallback } export interface IClientSubscribeOptions { /** * the QoS */ - qos: QoS + qos: QoS, + /* + * no local flag + * */ + nl?: boolean, + /* + * Retain As Published flag + * */ + rap?: boolean, + /* + * Retain Handling option + * */ + rh?: number } export interface IClientReconnectOptions { /** -- Gitblit v1.8.0