ConfiguredInternetSpeed

ConfiguredInternetSpeed

#Overview

name: ConfiguredInternetSpeed

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 ConfiguredInternetSpeed is to set the default network speed for internet connections in Unreal Engine. This setting is used to configure the data transfer rate for online gameplay when the connection is not identified as a LAN connection.

ConfiguredInternetSpeed is primarily used by the networking subsystem of Unreal Engine. Specifically, it is referenced in the Engine module, particularly in the Player and NetConnection classes.

The value of this variable is set globally through the UPROPERTY(globalconfig) macro in the UPlayer class. This means it can be configured in the engine’s configuration files and will be consistent across the entire game.

ConfiguredInternetSpeed interacts with ConfiguredLanSpeed, another global configuration variable. The engine chooses between these two based on whether the connection is identified as a LAN connection or not.

Developers should be aware that:

  1. If ConfiguredInternetSpeed is set to 0, the engine will default to a speed of 2600 (presumably in bytes per second).
  2. This variable directly affects the CurrentNetSpeed of network connections, which can impact game performance and player experience.
  3. It’s used in conjunction with URL options to determine the appropriate network speed for each connection.

Best practices when using this variable include:

  1. Set a reasonable default value that matches the expected internet speeds of your target audience.
  2. Consider allowing players to adjust this setting in-game to accommodate different internet speeds.
  3. Test your game with various ConfiguredInternetSpeed values to ensure smooth gameplay across different network conditions.
  4. Remember that this is a global setting, so changing it will affect all internet connections in the game.
  5. Use in conjunction with other network-related settings for fine-tuned network performance optimization.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEngine.ini:1614, section: [/Script/Engine.Player]

Location: <Workspace>/Projects/Lyra/Config/DefaultEngine.ini:86, section: [/Script/Engine.Player]

#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:29

Scope (from outer to inner):

file
class        class UPlayer : public UObject, public FExec

Source code excerpt:

	/** @todo document */
	UPROPERTY(globalconfig)
	int32 ConfiguredInternetSpeed;
	
	/** @todo document */
	UPROPERTY(globalconfig)
	int32 ConfiguredLanSpeed;

public:

#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
		{