Navigation
API > API/Plugins > API/Plugins/ConcertSyncCore
Notifies clients about the ability to start or stop replicating specific objects.
Sync control serves to inform clients whether the data they wish to replicate has any receivers. Replicating data when no one is listening is unnecessary.
Until a sync control event is received, clients should assume no interest in the data.
Special Circumstances:
FConcertReplication_Join_Request: The server doesn't send any FConcertReplication_ChangeSyncControl event in response to the handshake. Instead, the resulting sync control is in FConcertReplication_Join_Response::SyncControl.
Explicit authority change via FConcertReplication_ChangeAuthority_Request: No sync control event is sent. FConcertReplication_ChangeAuthority_Response::SyncControl contains the objects for which the client received instant sync control. Objects losing sync control are implicitly determined by using FSyncControlState::Aggregate.
Implicit authority change via FConcertReplication_ChangeStream_Request: No sync control event is generated as its result is implicit from the request and response. Stream changes can only cause the client to lose authority, thus sync control, over objects. Therefore, objects losing sync control can be enumerated using FSyncControlState::Aggregate.
Example Flow:
Client 1 registers stream 's' with object 'x' (and associated properties) using FConcertReplication_ChangeStream_Request.
Client 1 takes authority over 'x' with 's' using FConcertReplication_ChangeAuthority_Request.
Client 2 joins (and wants to receive the data).
Server sends FConcertReplication_ChangeSyncControl to client 1 to begin replicating 'x' in 's'.
Client 2 leaves.
Server sends FConcertReplication_ChangeSyncControl to client 1 to cease replicating 'x' in 's'.
| Name | FConcertReplication_ChangeSyncControl |
| Type | struct |
| Header File | /Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncCore/Source/ConcertSyncCore/Public/Replication/Messages/SyncControl.h |
| Include Path | #include "Replication/Messages/SyncControl.h" |
Syntax
USTRUCT ()
struct FConcertReplication_ChangeSyncControl
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| NewControlStates | TMap< FConcertObjectInStreamID, bool > | Toggles the objects (which the receiving client 1. has previously registered and 2. taken authority over) to replicate or not. | Replication/Messages/SyncControl.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool DoesAtLeastOneObjectGainSyncControl() |
Replication/Messages/SyncControl.h | ||
bool DoesAtLeastOneObjectLoseSyncControl() |
Replication/Messages/SyncControl.h | ||
bool IsEmpty() |
Replication/Messages/SyncControl.h |