A caller for a method on the server.
TODO-DOC
Example
const method = new VOXELIZE.Method();
// Register the method caller with the network.
network.register(method);
// Call a method on the server.
method.call("my-method", { hello: "world" });
Implements
Properties
packets
• packets: MessageProtocol
<any
, any
, any
, any
>[] = []
An array of packets to be sent to the server. These packets will be
sent to the server after every network.flush()
call.
Implementation of
Methods
call
▸ call(name
, payload?
): void
Call a defined method on the server.
Parameters
Name | Type | Description |
---|---|---|
name | string | The name of the method to call. |
payload | any | The JSON serializable payload to send to the server. |
Returns
void