UNetDriver::ServerReplicateActors

Called to replicate any relevant actors to the connections contained within this net driver

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/NetDriver.h

Include

#include "Engine/NetDriver.h"

Source

/Engine/Source/Runtime/Engine/Private/NetworkDriver.cpp

Syntax

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.

Returns

the number of actors that were replicated

Parameters

Parameter

Description

DeltaSeconds

elapsed time since last call

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback