Concert.Replication.SimulateQueryTimeouts
Concert.Replication.SimulateQueryTimeouts
#Overview
name: Concert.Replication.SimulateQueryTimeouts
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Whether the client should pretend that query requests timed out instead of sending to the server.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of Concert.Replication.SimulateQueryTimeouts is to simulate timeouts for query requests in the Concert replication system. This setting is used for testing and debugging purposes within the Unreal Engine’s Concert plugin, which is part of the collaboration and multi-user editing framework.
This setting variable is primarily used in the ConcertSyncClient module, which is part of the Concert plugin system in Unreal Engine 5. It’s specifically utilized in the replication manager component of the Concert system.
The value of this variable is set as a console variable (CVar) with a default value of false. It can be changed at runtime through the console or configuration files.
The associated variable CVarSimulateQueryTimeouts directly interacts with Concert.Replication.SimulateQueryTimeouts. They share the same value and purpose.
Developers must be aware that enabling this variable will cause the client to simulate query request timeouts instead of actually sending requests to the server. This can be useful for testing how the system handles timeouts, but it should not be enabled in production environments.
Best practices when using this variable include:
- Only use it for testing and debugging purposes.
- Ensure it’s disabled in production builds.
- Use it in conjunction with other timeout simulation variables (like CVarSimulateStreamChangeTimeouts) for comprehensive timeout testing.
- Document its usage clearly in test plans or debugging procedures.
Regarding the associated variable CVarSimulateQueryTimeouts:
The purpose of CVarSimulateQueryTimeouts is identical to Concert.Replication.SimulateQueryTimeouts. It’s the C++ representation of the console variable in the code.
This variable is used within the ConcertSyncClient module, specifically in the ReplicationManagerState_Connected class.
The value is set when the TAutoConsoleVariable is created, with a default value of false.
CVarSimulateQueryTimeouts directly controls the behavior of the QueryClientInfo function in the ReplicationManagerState_Connected class. When enabled, it causes this function to return a simulated timeout response instead of performing the actual query.
Developers should be aware that this variable directly affects the behavior of the replication system and should be used cautiously.
Best practices for using CVarSimulateQueryTimeouts include:
- Use it in controlled test environments only.
- Reset it to false after testing to ensure normal operation.
- Consider creating automated tests that leverage this variable to verify timeout handling.
- Be cautious when using it in multiplayer or networked scenarios, as it may cause unexpected behavior.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncClient/Source/ConcertSyncClient/Private/Replication/Manager/ReplicationManagerState_Connected.cpp:27
Scope (from outer to inner):
file
namespace UE::ConcertSyncClient::Replication
Source code excerpt:
);
TAutoConsoleVariable<bool> CVarSimulateQueryTimeouts(
TEXT("Concert.Replication.SimulateQueryTimeouts"),
false,
TEXT("Whether the client should pretend that query requests timed out instead of sending to the server.")
);
TAutoConsoleVariable<bool> CVarSimulateStreamChangeTimeouts(
TEXT("Concert.Replication.SimulateStreamChangeTimeouts"),
false,
#Associated Variable and Callsites
This variable is associated with another variable named CVarSimulateQueryTimeouts
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncClient/Source/ConcertSyncClient/Private/Replication/Manager/ReplicationManagerState_Connected.cpp:26
Scope (from outer to inner):
file
namespace UE::ConcertSyncClient::Replication
Source code excerpt:
TEXT("Whether the client should pretend that authority requests timed out instead of sending to the server.")
);
TAutoConsoleVariable<bool> CVarSimulateQueryTimeouts(
TEXT("Concert.Replication.SimulateQueryTimeouts"),
false,
TEXT("Whether the client should pretend that query requests timed out instead of sending to the server.")
);
TAutoConsoleVariable<bool> CVarSimulateStreamChangeTimeouts(
TEXT("Concert.Replication.SimulateStreamChangeTimeouts"),
#Loc: <Workspace>/Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncClient/Source/ConcertSyncClient/Private/Replication/Manager/ReplicationManagerState_Connected.cpp:169
Scope (from outer to inner):
file
namespace UE::ConcertSyncClient::Replication
function TFuture<FConcertReplication_QueryReplicationInfo_Response> FReplicationManagerState_Connected::QueryClientInfo
Source code excerpt:
TFuture<FConcertReplication_QueryReplicationInfo_Response> FReplicationManagerState_Connected::QueryClientInfo(FConcertReplication_QueryReplicationInfo_Request Args)
{
if (CVarSimulateQueryTimeouts.GetValueOnGameThread())
{
return MakeFulfilledPromise<FConcertReplication_QueryReplicationInfo_Response>(FConcertReplication_QueryReplicationInfo_Response{ EReplicationResponseErrorCode::Timeout }).GetFuture();
}
if (EnumHasAllFlags(Args.QueryFlags, EConcertQueryClientStreamFlags::SkipAuthority | EConcertQueryClientStreamFlags::SkipStreamInfo | EConcertQueryClientStreamFlags::SkipFrequency ))
{