FWolangReplication
- Module
- Scripting
- Header
#include "Scripting/WolangReplication.h"- Namespace
Mowo
Public functions
| Returns | Name | Description |
|---|---|---|
void | BuildPlan | The plan of a class chain, base first (a child redeclaring a member takes its own). |
void | SetNetPort | The session the replication talks to; null restores the FNetSession port. |
IWolangNetPort& | GetNetPort | |
void | InstallSessionHooks | Hooks the script lane into FNetSession. |
void | UninstallSessionHooks | |
void | Begin | Instance lifecycle, called by FWolangScriptInstance for actors. |
void | Tick | |
void | End | |
bool | ReplicateNow | The authority sends the fields that changed (or all of them). |
bool | CallRpc | Calls a @Server/@Client/@Multicast method where its kind says it runs, routing it over the session when that is another machine. |
bool | Receive | An envelope that arrived for actor. |
const FWolangReplicationStats& | GetStats | |
void | ResetStats | |
std::string | DescribeField | One line per replicated field and RPC: the Details rows and the Network debug panel's list. |
std::string | DescribeRpc | |
const char* | TypeName |
Function details
BuildPlan
static void BuildPlan(const FWolangScriptClass& script, const std::vector<const FWolangClassDecl*>& chain, FWolangReplicationPlan& out, std::vector<FWolangClassProblem>& problems)The plan of a class chain, base first (a child redeclaring a member takes its own). Anything the bridge cannot carry is a problem, not a half plan.
SetNetPort
static void SetNetPort(IWolangNetPort* port)The session the replication talks to; null restores the FNetSession port.
GetNetPort
static IWolangNetPort& GetNetPort()InstallSessionHooks
static void InstallSessionHooks()Hooks the script lane into FNetSession. Install is idempotent.
UninstallSessionHooks
static void UninstallSessionHooks()Begin
static void Begin(FWolangScriptInstance& instance)Instance lifecycle, called by FWolangScriptInstance for actors.
Tick
static void Tick(FWolangScriptInstance& instance, float deltaSeconds)End
static void End(FWolangScriptInstance& instance)ReplicateNow
static bool ReplicateNow(FWolangScriptInstance& instance, bool forceFull)The authority sends the fields that changed (or all of them). True when a batch left. Tick calls it at 20 Hz; the rows call it directly.
CallRpc
static bool CallRpc(FWolangScriptInstance& instance, const std::string& method, const std::vector<VisualScriptValue>& arguments)Calls a @Server/@Client/@Multicast method where its kind says it runs, routing it over the session when that is another machine.
Receive
static bool Receive(AActor* actor, const uint8_t* data, size_t length, bool fromServer, uint32_t senderPeer)An envelope that arrived for actor. fromServer is the packet's origin, senderPeer the connection a client's packet came from.
GetStats
static const FWolangReplicationStats& GetStats()ResetStats
static void ResetStats()DescribeField
static std::string DescribeField(const FWolangReplicatedField& field)One line per replicated field and RPC: the Details rows and the Network debug panel's list.
DescribeRpc
static std::string DescribeRpc(const FWolangRpcMethod& rpc)TypeName
static const char* TypeName(FMValueType type)