class

FRpcDispatcher

Module
Networking
Header
#include "Networking/Replication/RpcDispatcher.h"
Namespace
Mowo

Public functions

ReturnsNameDescription
boolBuildPayloadSerializes a call to functionName on desc into out.
boolInvokePayloadDeserializes and invokes on a component instance.
boolDispatchComponentRpcReceiver-side glue: methodId = componentId.
intFindFunctionIndexIndex of functionName in desc.functions, or -1.
boolBuildArgsPayloadSerializes only the ARGUMENTS of the method at methodIndex (the wire carries the index, so the name is redundant).
boolInvokeArgsPayloadDeserializes an args-only payload and invokes desc.functions[methodIndex] on component.
boolDispatchComponentRpcByIndexReceiver-side glue keyed on (componentId, methodIndex).

Function details

BuildPayload

C++
static bool BuildPayload(const TypeDescriptor& desc, const char* functionName, void** args, std::vector<uint8_t>& out)

Serializes a call to functionName on desc into out. args follows the thunk ABI: paramCount pointers to concrete values.

InvokePayload

C++
static bool InvokePayload(const TypeDescriptor& desc, void* component, const uint8_t* data, size_t len)

Deserializes and invokes on a component instance. Returns false on unknown function, unsupported param, or truncated payload.

DispatchComponentRpc

C++
static bool DispatchComponentRpc(World& world, EntityID entity, uint16_t componentId, const uint8_t* data, size_t len)

Receiver-side glue: methodId = componentId. Resolves the component on entity via the reflection registry and invokes the payload. Wire it into ReplicationManager::SetRpcReceiver together with FindEntityByNetworkId.

FindFunctionIndex

C++
static int FindFunctionIndex(const TypeDescriptor& desc, const char* functionName)

Index of functionName in desc.functions, or -1. The caller stamps this into the wire's methodIndex so the receiver resolves the same method and the authority policy can gate it alone.

BuildArgsPayload

C++
static bool BuildArgsPayload(const TypeDescriptor& desc, uint16_t methodIndex, void** args, std::vector<uint8_t>& out)

Serializes only the ARGUMENTS of the method at methodIndex (the wire carries the index, so the name is redundant). Returns false on a bad index, a non-void return, or an unmarshallable param.

InvokeArgsPayload

C++
static bool InvokeArgsPayload(const TypeDescriptor& desc, void* component, uint16_t methodIndex, const uint8_t* data, size_t len)

Deserializes an args-only payload and invokes desc.functions[methodIndex] on component. Returns false on a bad index or a truncated payload.

DispatchComponentRpcByIndex

C++
static bool DispatchComponentRpcByIndex(World& world, EntityID entity, uint16_t componentId, uint16_t methodIndex, const uint8_t* data, size_t len)

Receiver-side glue keyed on (componentId, methodIndex). Resolves the component on entity and invokes the method the wire named by index.

Generated from Networking/Replication/RpcDispatcher.h via networking.json · Nov 4, 2026Version 1.0.0