Navigation
Unreal Engine C++ API Reference > Runtime > Engine > Engine > UNetDriver
References
Module | Engine |
Header | /Engine/Source/Runtime/Engine/Classes/Engine/NetDriver.h |
Include | #include "Engine/NetDriver.h" |
Source | /Engine/Source/Runtime/Engine/Private/NetDriver.cpp |
virtual int32 ServerReplicateActors
(
float DeltaSeconds
)
Remarks
Called to replicate any relevant actors to the connections contained within this net driver
Process as many clients as allowed given Engine.NetClientTicksPerSecond, first building a list of actors to consider for relevancy checking, and then attempting to replicate each actor for each connection that it is relevant to until the connection becomes saturated.
NetClientTicksPerSecond is used to throttle how many clients are updated each frame, hoping to avoid saturating the server's upstream bandwidth, although the current solution is far from optimal. Ideally the throttling could be based upon the server connection becoming saturated, at which point each connection is reduced to priority only updates, and spread out amongst several ticks. Also might want to investigate eliminating the redundant consider/relevancy checks for Actors that were successfully replicated for some channels but not all, since that would make a decent CPU optimization. the number of actors that were replicated
Parameters
Name | Description |
---|---|
DeltaSeconds | elapsed time since last call |