FRpcDispatcher
- Module
- Networking
- Header
#include "Networking/Replication/RpcDispatcher.h"- Namespace
Mowo
Public functions
| Returns | Name | Description |
|---|---|---|
bool | BuildPayload | Serializes a call to functionName on desc into out. |
bool | InvokePayload | Deserializes and invokes on a component instance. |
bool | DispatchComponentRpc | Receiver-side glue: methodId = componentId. |
int | FindFunctionIndex | Index of functionName in desc.functions, or -1. |
bool | BuildArgsPayload | Serializes only the ARGUMENTS of the method at methodIndex (the wire carries the index, so the name is redundant). |
bool | InvokeArgsPayload | Deserializes an args-only payload and invokes desc.functions[methodIndex] on component. |
bool | DispatchComponentRpcByIndex | Receiver-side glue keyed on (componentId, methodIndex). |
Function details
BuildPayload
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
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
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
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
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
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
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.