Skip to main content

namespace RemoteObject

RemoteObject offers a convenient way to retrieve data and invoke methods across a RemoteChannel. It involves setting up a remote object server that takes a given TypeScript object and allows a remote object client to perform remote calls to this object and getting the results.

Interfaces

NameDescription
RemoteObject.CallInterface defining a remote call structure.
RemoteObject.ConstructorsDefines the static RemoteObject API.

Static Methods

createClient

Returns a new RpcProxy that can be used to perform remote operations on a RemoteObject server.

Definition

createClient<T>(commCh: RemoteObject.ClientCrossChannel): RpcProxy<T>;

Type parameters

NameDescription
Tthe remote object interface type

Parameters

NameTypeDescription
commChRemoteObject.ClientCrossChannelthe cross-channel to use for communication

createServer

Creates a remote object server that allows clients to perform remote operations on the given source object.

Definition

createServer<T>(source: T, commCh: RemoteObject.ServerCrossChannel): Promise<void>;

Type parameters

NameDescription
Tthe type of the object to serve remotely

Parameters

NameTypeDescription
sourceT
commChRemoteObject.ServerCrossChannelthe cross-channel to use for communication