Skip to main content
Shared Runs in your resource. No export hop per call. See the Callbacks guide.

Server

Register

string
required
Letters, digits and underscores. Registered as <resource>:<name>.
UgNetworkOptions
required
fun(source, ...): any
required
Gets validated arguments. Returns one value.
Pipeline, in order: exists, concurrency cap (4 in flight per player), global budget and rate limit, requirePlayer, requireAlive, permission, schema, handler, reply. A handler error replies internal_error and logs on the server.

Unregister

Await

Asks a client. MUST run in a thread. The reply is untrusted, so it is validated with schema, a single rule from UgCore.Schema. timeout defaults to 10000 ms.

Trigger

Callback form of Await. cb gets (ok, value, errorCode).

Client

Await

MUST run in a thread. Times out after 10 seconds with timeout. Late responses are ignored.

Trigger

Register / Unregister

Answers server requests to <resource>:<name>. The handler returns one value.

Example