/// /// /// import { Channel } from 'nerdbank-streams'; import { MessageConnection } from 'vscode-jsonrpc/node'; import { Formatters, MessageDelimiters } from './constants'; import { ServiceMoniker } from './ServiceMoniker'; import { RpcConnection, RpcEventServer, ServiceRpcDescriptor } from './ServiceRpcDescriptor'; import { IDisposable } from './IDisposable'; import { MultiplexingStreamOptions } from 'nerdbank-streams'; import { EventEmitter } from 'stream'; /** * Constructs a JSON RPC message connection to a service */ export declare class ServiceJsonRpcDescriptor extends ServiceRpcDescriptor { readonly formatter: Formatters; readonly messageDelimiter: MessageDelimiters; readonly protocol = "json-rpc"; /** * The options to use when creating a new MultiplexingStream as a prerequisite to establishing an RPC connection. */ private readonly multiplexingStreamOptions?; private readonly connectionFactory; /** * Initializes a new instance of the [ServiceJsonRpcDescriptor](#ServiceJsonRpcDescriptor) class * @param moniker The moniker this descriptor describes * @param formatter The formatter to use when sending messages * @param messageDelimiter The delimiter to use in separating messages * @param multiplexingStreamOptions Options to configure a multiplexing stream, on which channel 0 becomes the RPC channel. If undefined, no multiplexing stream will be set up. */ constructor(moniker: ServiceMoniker, formatter: Formatters, messageDelimiter: MessageDelimiters, multiplexingStreamOptions?: MultiplexingStreamOptions); constructRpcConnection(pipe: NodeJS.ReadWriteStream | Channel): JsonRpcConnection; equals(descriptor: ServiceRpcDescriptor): boolean; private createSeedChannels; } export declare class JsonRpcConnection extends RpcConnection { readonly messageConnection: MessageConnection; constructor(messageConnection: MessageConnection); addLocalRpcTarget(rpcTarget: any | RpcEventServer): void; constructRpcClient(): T & IDisposable; startListening(): void; dispose(): void; } export interface IProxyTarget { messageConnection: MessageConnection; eventEmitter: EventEmitter; }