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
| Name | Description |
|---|---|
RemoteObject.Call | Interface defining a remote call structure. |
RemoteObject.Constructors | Defines the static RemoteObject API. |
Static Methods
createClient
Returns a new RpcProxy that can be used to perform remote operations on a RemoteObject server.
createClientRpcProxy that can be used to perform remote operations on a RemoteObject server.Definition
createClient<T>(commCh: RemoteObject.ClientCrossChannel): RpcProxy<T>;
Type parameters
| Name | Description |
|---|---|
| T | the remote object interface type |
Parameters
| Name | Type | Description |
|---|---|---|
commCh | RemoteObject.ClientCrossChannel | the cross-channel to use for communication |
createServer
Creates a remote object server that allows clients to perform remote operations on the given source object.
createServersource object.Definition
createServer<T>(source: T, commCh: RemoteObject.ServerCrossChannel): Promise<void>;
Type parameters
| Name | Description |
|---|---|
| T | the type of the object to serve remotely |
Parameters
| Name | Type | Description |
|---|---|---|
source | T | |
commCh | RemoteObject.ServerCrossChannel | the cross-channel to use for communication |