UNPKG

@cloudamqp/amqp-client

Version:

AMQP 0-9-1 client, both for browsers (WebSocket) and node (TCP Socket)

32 lines 1.02 kB
import { AMQPBaseClient } from './amqp-base-client.js'; import type { AMQPTlsOptions } from './amqp-tls-options.js'; import * as net from 'net'; /** * AMQP 0-9-1 client over TCP socket. */ export declare class AMQPClient extends AMQPBaseClient { socket?: net.Socket | undefined; readonly tls: boolean; readonly host: string; readonly port: number; readonly tlsOptions: AMQPTlsOptions | undefined; private readonly insecure; private framePos; private frameSize; private readonly frameBuffer; /** * @param url - uri to the server, example: amqp://user:passwd@localhost:5672/vhost */ constructor(url: string, tlsOptions?: AMQPTlsOptions); connect(): Promise<AMQPBaseClient>; private connectSocket; private onRead; /** * @ignore * @param bytes to send * @return fulfilled when the data is enqueued */ send(bytes: Uint8Array): Promise<void>; protected closeSocket(): void; } //# sourceMappingURL=amqp-socket-client.d.ts.map