@jonaskello-forks/amqp-client
Version:
AMQP 0-9-1 client, both for browsers (WebSocket) and node (TCP Socket)
28 lines • 910 B
TypeScript
import { AMQPBaseClient } from './amqp-base-client.js';
/**
* WebSocket client for AMQP 0-9-1 servers
*/
export declare class AMQPWebSocketClient extends AMQPBaseClient {
readonly url: string;
private socket?;
private framePos;
private frameSize;
private frameBuffer;
/**
* @param url to the websocket endpoint, example: wss://server/ws/amqp
*/
constructor(url: string, vhost?: string, username?: string, password?: string, name?: string, frameMax?: number, heartbeat?: number);
/**
* Establish a AMQP connection over WebSocket
*/
connect(): Promise<AMQPBaseClient>;
/**
* @param bytes to send
* @return fulfilled when the data is enqueued
*/
send(bytes: Uint8Array): Promise<void>;
protected closeSocket(): void;
private handleMessage;
static platform(): string;
}
//# sourceMappingURL=amqp-websocket-client.d.ts.map