The wire protocol shared by fivem.client.core.Callbacks and fivem.server.core.Callbacks.

FiveM's events are one-way: you can send, but you can't get an answer back. A callback is therefore two events — a request carrying a correlation key, and a response carrying the same key back — with the caller blocked on a promise in between.

The event names are namespaced per resource. Without that, two Haxe resources on the same server would both handle each other's callback requests, since net events are global rather than resource-scoped.

Static methods

staticinlineclientRequest():String

Event a client sends to ask the server something.

staticinlineclientResponse():String

Event the server sends back with the answer.

staticnextKey():String

A correlation key unique within this runtime.

Combines a monotonic counter with the game clock so that keys stay distinct even across a resource restart, which resets the counter while responses to the previous run may still be in flight.

staticinlineserverRequest():String

Event the server sends to ask a client something.

staticinlineserverResponse():String

Event the client sends back with the answer.