@seriousme/opifex
Version:
MQTT client & server for Deno & NodeJS
16 lines (12 loc) • 425 B
text/typescript
import type { ClientId, PacketId, PublishPacket, QoS, Topic } from "./deps.ts";
export type PacketStore = Map<PacketId, PublishPacket>;
export type SubscriptionStore = Map<Topic, QoS>;
export interface IStore {
existingSession: boolean;
clientId: ClientId;
pendingIncoming: PacketStore;
pendingOutgoing: PacketStore;
pendingAckOutgoing: Set<PacketId>;
subscriptions: SubscriptionStore;
nextId(): PacketId;
}