@seriousme/opifex
Version:
MQTT client & server for Deno & NodeJS
24 lines • 636 B
TypeScript
import type { PacketId, QoS, TopicFilter, TPacketType } from "./types.ts";
/**
* SubscribePacket is sent from client to server to subscribe to topics
*/
export type SubscribePacket = {
type: TPacketType;
id: PacketId;
subscriptions: Subscription[];
};
/**
* The topic to subscribe to and the associated QoS
*/
export type Subscription = {
topicFilter: TopicFilter;
qos: QoS;
};
export declare const subscribe: {
encode(packet: SubscribePacket): {
flags: number;
bytes: number[];
};
decode(buffer: Uint8Array, flags: number): SubscribePacket;
};
//# sourceMappingURL=subscribe.d.ts.map