import { ProxyInterface } from "../network/connection/TCPMTProxy"; /** * Promise-based TCP socket wrapper used as the network transport layer. * * When a {@link SocksProxyType} proxy is provided, connections are tunneled * through the SOCKS proxy via the `socks` package. MTProxy connections are * handled at a higher level by {@link TCPMTProxy} and do not affect this class. */ export declare class PromisedNetSockets { private client?; private closed; private stream; private canRead?; private resolveRead; private proxy?; constructor(proxy?: ProxyInterface); readExactly(number: number): Promise>; read(number: number): Promise>; readAll(): Promise>; /** * Creates a new connection * @param port * @param ip * @returns {Promise} */ connect(port: number, ip: string): Promise; write(data: Buffer): void; close(): Promise; receive(): Promise; toString(): string; }