Skip to main content

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

NetIntercept.packets

Methods

call

call(name, payload?): void

Call a defined method on the server.

Parameters

NameTypeDescription
namestringThe name of the method to call.
payloadanyThe JSON serializable payload to send to the server.

Returns

void