@seriousme/opifex
Version:
MQTT client & server for Deno & NodeJS
28 lines • 1.23 kB
TypeScript
import { type ClientId, type PacketId, type PublishPacket, type QoS, type Topic, type TopicFilter } from "../deps.ts";
import type { Client, Handler, IPersistence, RetainStore } from "../persistence.ts";
import type { IStore, PacketStore, SubscriptionStore } from "../store.ts";
export declare class MemoryStore implements IStore {
existingSession: boolean;
clientId: ClientId;
private packetId;
pendingIncoming: PacketStore;
pendingOutgoing: PacketStore;
pendingAckOutgoing: Set<PacketId>;
subscriptions: SubscriptionStore;
constructor(clientId: ClientId);
nextId(): PacketId;
}
export declare class MemoryPersistence implements IPersistence {
clientList: Map<ClientId, Client>;
retained: RetainStore;
private trie;
constructor();
registerClient(clientId: ClientId, handler: Handler, clean: boolean): IStore;
deregisterClient(clientId: ClientId): void;
subscribe(store: IStore, topicFilter: TopicFilter, qos: QoS): void;
unsubscribe(store: IStore, topicFilter: TopicFilter): void;
private unsubscribeAll;
publish(topic: Topic, packet: PublishPacket): void;
handleRetained(clientId: ClientId): void;
}
//# sourceMappingURL=memoryPersistence.d.ts.map