Skip to main content

Configure networking

Networking is configured automatically for you by default. If you've turned off auto-configuration, you might need to add the following settings to Config\DefaultEngine.ini:

[/Script/Engine.Engine]
!NetDriverDefinitions=ClearArray
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="/Script/OnlineSubsystemRedpointEOS.EOSNetDriver",DriverClassNameFallback="/Script/OnlineSubsystemUtils.IpNetDriver")
+NetDriverDefinitions=(DefName="BeaconNetDriver",DriverClassName="/Script/OnlineSubsystemRedpointEOS.EOSNetDriver",DriverClassNameFallback="/Script/OnlineSubsystemUtils.IpNetDriver")
info

You need to be using the configuration above even if your game is only using dedicated servers over IP. Using the EOSNetDriver is required for session registration, automatic encryption, trusted dedicated servers, sanction checks and Anti-Cheat support.

Choosing a connection mode

When a listen server or dedicated server starts listening for incoming connections, it is made available over either P2P or IP. By default, it has the following behaviour:

  • If there is at least one user logged into EOS, the connection will be made available over peer-to-peer.
  • If there are no users logged in, it will be made available over IP address.

You can change the behaviour by setting the NetMode= flag in the URL when opening the map.

NetMode=Auto

This has the same behaviour as described above.

NetMode=ForceIP

If you start a server like so: open MyMap?listen?NetMode=ForceIP then the server will start listening on it's IP address, regardless of whether or not there are local users logged in.

NetMode=ForceP2P

If you start a server like so: open MyMap?listen?NetMode=ForceP2P then the server will start listening over EOS P2P. This will only work if there's a locally logged in user; if there isn't, opening the map will fail.

Customizing UNetDriver settings

If you'd like to customize the UNetDriver settings (such as changing MaxClientRate), you'll need to create a separate DefaultOnlineSubsystemRedpointEOS.ini config file underneath your project's Config folder. Note that this file is named differently and is not DefaultEngine.ini.

Once you've created that file, you can override the default settings like so:

[/Script/OnlineSubsystemRedpointEOS.EOSNetDriver]
MaxClientRate=100000
MaxInternetClientRate=100000

A full list of default settings for the EOS net driver is shown below:

[/Script/OnlineSubsystemRedpointEOS.EOSNetDriver]
!ChannelDefinitions=ClearArray
+ChannelDefinitions=(ChannelName=Control, ClassName=/Script/OnlineSubsystemRedpointEOS.EOSControlChannel, StaticChannelIndex=0, bTickOnCreate=true, bServerOpen=false, bClientOpen=true, bInitialServer=false, bInitialClient=true)
+ChannelDefinitions=(ChannelName=Voice, ClassName=/Script/Engine.VoiceChannel, StaticChannelIndex=1, bTickOnCreate=true, bServerOpen=true, bClientOpen=true, bInitialServer=true, bInitialClient=true)
+ChannelDefinitions=(ChannelName=Actor, ClassName=/Script/Engine.ActorChannel, StaticChannelIndex=-1, bTickOnCreate=false, bServerOpen=true, bClientOpen=false, bInitialServer=false, bInitialClient=false)
NetConnectionClassName="/Script/OnlineSubsystemRedpointEOS.EOSNetConnection"
ConnectionTimeout=80.0
InitialConnectTimeout=120.0
NetServerMaxTickRate=30
MaxNetTickRate=120
KeepAliveTime=0.2
MaxClientRate=15000
MaxInternetClientRate=10000
RelevantTimeout=5.0
SpawnPrioritySeconds=1.0
ServerTravelPause=4.0
TimeoutMultiplierForUnoptimizedBuilds=1
RecentlyDisconnectedTrackingTime=120
MaxPortCountToTry=512
ReplicationDriverClassName=