import { AMQPChannel } from "./amqp-channel.js"; import { AMQPError } from "./amqp-error.js"; import { AMQPView } from "./amqp-view.js"; import type { Logger } from "./types.js"; export declare const VERSION = "3.4.1"; /** * Base class for AMQPClients. * Implements everything except how to connect, send data and close the socket */ export declare abstract class AMQPBaseClient { vhost: string; username: string; password: string; name?: string; platform?: string; channels: AMQPChannel[]; protected connectPromise?: [(conn: AMQPBaseClient) => void, (err: Error) => void]; protected closePromise?: [(value?: void) => void, (err: Error) => void]; protected onUpdateSecretOk?: (value?: void) => void; closed: boolean; blocked?: string; channelMax: number; frameMax: number; heartbeat: number; onerror: (error: AMQPError) => void; logger: Logger | undefined; /** Used for string -> arraybuffer when publishing */ readonly textEncoder: InstanceType; readonly bufferPool: AMQPView[]; /** * @param name - name of the connection, set in client properties * @param platform - used in client properties * @param logger - optional logger instance, defaults to undefined (no logging) */ constructor(vhost: string, username: string, password: string, name?: string, platform?: string, frameMax?: number, heartbeat?: number, channelMax?: number, logger?: Logger | null); /** * Open a channel * @param [id] - An existing or non existing specific channel */ channel(id?: number): Promise; /** * Gracefully close the AMQP connection * @param [reason] might be logged by the server */ close(reason?: string, code?: number): Promise; updateSecret(newSecret: string, reason: string): Promise; /** * Try establish a connection */ abstract connect(): Promise; /** * @ignore * @param bytes to send * @return fulfilled when the data is enqueued */ abstract send(bytes: Uint8Array): Promise; protected abstract closeSocket(): void; private rejectClosed; private rejectConnect; /** * Parse and act on frames in an AMQPView * @ignore */ protected parseFrames(view: AMQPView): void; } //# sourceMappingURL=amqp-base-client.d.ts.map