IOTConnect-Web/node_modules/mqtt/build/lib/default-message-id-provider.d.ts
2024-05-09 09:49:52 +08:00

17 lines
477 B
TypeScript

export interface IMessageIdProvider {
allocate(): number | null;
getLastAllocated(): number | null;
register(num: number): boolean;
deallocate(num: number): void;
clear(): void;
}
export default class DefaultMessageIdProvider implements IMessageIdProvider {
private nextId;
constructor();
allocate(): number;
getLastAllocated(): number;
register(messageId: number): boolean;
deallocate(messageId: number): void;
clear(): void;
}