ConfiguredLanSpeed
ConfiguredLanSpeed
#Overview
name: ConfiguredLanSpeed
The value of this variable can be defined or overridden in .ini config files. 2
.ini config files referencing this setting variable.
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of ConfiguredLanSpeed is to set the network speed for LAN (Local Area Network) connections in Unreal Engine games. This variable is used to configure the data transfer rate for multiplayer gameplay over local networks.
ConfiguredLanSpeed is primarily used by the networking subsystem of Unreal Engine, specifically within the Engine module. It’s referenced in the Player and GameNetworkManager classes, which are core components of the engine’s networking infrastructure.
The value of this variable is set globally through the engine’s configuration system, as indicated by the UPROPERTY(globalconfig) decorator in the UPlayer class definition.
ConfiguredLanSpeed interacts with other networking-related variables, such as ConfiguredInternetSpeed and CurrentNetSpeed. It’s used in conjunction with these variables to determine the appropriate network speed for different connection types.
Developers must be aware that this variable directly impacts the performance and responsiveness of multiplayer games on local networks. Setting it too low might result in laggy gameplay, while setting it too high could lead to unnecessary network congestion.
Best practices when using this variable include:
- Carefully considering the target hardware and network infrastructure when setting this value.
- Testing thoroughly with various LAN setups to ensure optimal performance.
- Providing options for players to adjust this setting if necessary, as network capabilities can vary.
- Balancing this setting with other network-related variables to achieve the best overall networking performance.
- Regularly reviewing and updating this value as network technologies improve over time.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEngine.ini:1615, section: [/Script/Engine.Player]
- INI Section:
/Script/Engine.Player
- Raw value:
100000
- Is Array:
False
Location: <Workspace>/Projects/Lyra/Config/DefaultEngine.ini:87, section: [/Script/Engine.Player]
- INI Section:
/Script/Engine.Player
- Raw value:
200000
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Classes/Engine/Player.h:33
Scope (from outer to inner):
file
class class UPlayer : public UObject, public FExec
Source code excerpt:
/** @todo document */
UPROPERTY(globalconfig)
int32 ConfiguredLanSpeed;
public:
//~ Begin FExec Interface.
#if UE_ALLOW_EXEC_COMMANDS
ENGINE_API virtual bool Exec( UWorld* InWorld, const TCHAR* Cmd,FOutputDevice& Ar) override;
#endif
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Classes/GameFramework/GameNetworkManager.h:164
Scope (from outer to inner):
file
class class AGameNetworkManager : public AInfo
Source code excerpt:
float ClientNetSendMoveDeltaTimeStationary;
/** When player net speed (CurrentNetSpeed, based on ConfiguredInternetSpeed or ConfiguredLanSpeed) is less than or equal to this amount, ClientNetSendMoveDeltaTimeThrottled is used instead of ClientNetSendMoveDeltaTime. */
UPROPERTY(GlobalConfig)
int32 ClientNetSendMoveThrottleAtNetSpeed;
/** When player count is greater than this amount, ClientNetSendMoveDeltaTimeThrottled is used instead of ClientNetSendMoveDeltaTime. */
UPROPERTY(GlobalConfig)
int32 ClientNetSendMoveThrottleOverPlayerCount;
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/NetConnection.cpp:549
Scope (from outer to inner):
file
function void UNetConnection::InitBase
Source code excerpt:
// Other parameters.
CurrentNetSpeed = URL.HasOption(TEXT("LAN")) ? GetDefault<UPlayer>()->ConfiguredLanSpeed : GetDefault<UPlayer>()->ConfiguredInternetSpeed;
if ( CurrentNetSpeed == 0 )
{
CurrentNetSpeed = 2600;
}
else
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/NetConnection.cpp:649
Scope (from outer to inner):
file
function void UNetConnection::InitConnection
Source code excerpt:
{
CurrentNetSpeed = URL.HasOption(TEXT("LAN")) ? GetDefault<UPlayer>()->ConfiguredLanSpeed : GetDefault<UPlayer>()->ConfiguredInternetSpeed;
if ( CurrentNetSpeed == 0 )
{
CurrentNetSpeed = 2600;
}
else
{