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

20 lines
679 B
TypeScript

import { Duplex, Transform } from 'readable-stream';
import { IClientOptions } from './client';
export declare function writev(chunks: {
chunk: any;
encoding: string;
}[], cb: (err?: Error) => void): void;
export declare class BufferedDuplex extends Duplex {
socket: WebSocket;
private proxy;
private isSocketOpen;
private writeQueue;
constructor(opts: IClientOptions, proxy: Transform, socket: WebSocket);
_read(size?: number): void;
_write(chunk: any, encoding: string, cb: (err?: Error) => void): void;
_final(callback: (error?: Error) => void): void;
socketReady(): void;
private writeToProxy;
private processWriteQueue;
}