import { Socket } from 'net'; interface IAsyncSocketReaderOptions { timeout?: number; encoding?: BufferEncoding; } declare class AsyncSocketReader { readonly socket: Socket; private iterator; private readonly peek; private _onTimeout; private _pendingReject; constructor(socket: Socket); /** * Read a line ending with `\r\n`, does not include `\r\n` */ readLineTillCRLF(encoding?: BufferEncoding, signal?: AbortSignal): Promise; /** * Read specific number of bytes */ readBytes(length: number, signal?: AbortSignal): Promise; /** * Close the reader and underlying socket */ close(): void; private next; private setPeek; } export { AsyncSocketReader, IAsyncSocketReaderOptions as AsyncSocketReaderOptions }; //# sourceMappingURL=AsyncSocketReader.d.ts.map