import { RPC_ACTION, RPCMessage, ParseResult } from '../../constants'; import { SimpleSocketWrapper, DeepstreamConfig, DeepstreamServices } from '@deepstream/types'; /** * This class exposes an interface that mimicks the behaviour * of a SocketWrapper, connected to a local rpc provider, but * infact relays calls from and to the message connector - sneaky. */ export declare class RpcProxy implements SimpleSocketWrapper { private services; private remoteServer; private metaData; socketType: string; userId: string; clientData: null; serverData: null; isRemote: boolean; constructor(config: DeepstreamConfig, services: DeepstreamServices, remoteServer: string, metaData: any); sendAckMessage(message: RPCMessage): void; /** * Mimicks the SocketWrapper's send method, but expects a message object, * instead of a string. * * Adds additional information to the message that enables the counterparty * to identify the sender */ sendMessage(msg: RPCMessage): void; /** * Mimicks the SocketWrapper's sendError method. * Sends an error on the specified topic. The * action will automatically be set to ACTION.ERROR */ sendError(msg: RPCMessage, type: RPC_ACTION, errorMessage: string): void; parseMessage(serializedMessage: any): ParseResult[]; }