/// import { Readable, Writable } from 'stream'; import { Client } from '../base/Client'; import { JsonRpcRequest } from '../base/JsonRpcRequest'; export declare class StreamClient extends Client { /** * Encoder to send length prefixed messages to outgoing stream. */ private encoder?; /** * Construct a `StreamClient`. * * @param family The two letter prefix for the id of this client */ constructor(family?: string); /** * Start the client. * * @param {Writable} outgoing Outgoing stream to send JSON-RPC requests on. * @param {Readable} incoming Incoming stream to receive JSON-RPC responses on. */ start(outgoing?: Writable, incoming?: Readable): Promise; /** * @override Override of {@link Client.stop} that sets * `this.encoder` to `undefined` so that it gets * reconstructed with a new stream if `start()` is called later. */ stop(): Promise; /** * @implements Implements {@link Client.send} to start the * client if necessary and write the request to the encoder. */ protected send(request: JsonRpcRequest): Promise; }