MessageBus.UDP.EndpointDenyListEnabled
MessageBus.UDP.EndpointDenyListEnabled
#Overview
name: MessageBus.UDP.EndpointDenyListEnabled
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Specifies if the endpoint deny list is enabled. If enabled, a problematic endpoint will be tagged for possible exclusion from communication.The maximum attempts allowed is determined by MessageBus.UDP.MaxRetriesForBadEndpoint
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of MessageBus.UDP.EndpointDenyListEnabled is to control whether the endpoint deny list feature is enabled in the UDP messaging system of Unreal Engine 5. This setting is used to enhance the reliability and security of network communication by potentially excluding problematic endpoints.
This setting variable is primarily used in the UDP Messaging plugin, which is part of the Unreal Engine’s messaging system. Based on the callsites, it’s specifically utilized in the UdpMessageTransport module.
The value of this variable is set as a console variable (CVar) with a default value of true. It can be modified at runtime through the console or configuration files.
The associated variable CVarEndpointDenyListEnabled directly interacts with MessageBus.UDP.EndpointDenyListEnabled. They share the same value and purpose.
Developers must be aware that when this variable is enabled, the system will tag problematic endpoints for possible exclusion from communication. The maximum number of attempts allowed before an endpoint is potentially excluded is determined by another setting, MessageBus.UDP.MaxRetriesForBadEndpoint.
Best practices when using this variable include:
- Carefully consider the implications of disabling this feature, as it may expose the system to problematic endpoints.
- Monitor the behavior of the messaging system when this feature is enabled to ensure it’s not overly aggressive in excluding endpoints.
- Use in conjunction with MessageBus.UDP.MaxRetriesForBadEndpoint to fine-tune the behavior of the deny list feature.
- Consider logging or telemetry to track when endpoints are being added to the deny list to help diagnose network issues.
Regarding the associated variable CVarEndpointDenyListEnabled:
The purpose of CVarEndpointDenyListEnabled is identical to MessageBus.UDP.EndpointDenyListEnabled. It’s the actual console variable implementation that controls the endpoint deny list feature.
This variable is used in the UdpMessageTransport module of the UDP Messaging plugin. It’s specifically checked in the HandleProcessorEndpointCheck function to determine whether an endpoint should be allowed or potentially excluded from communication.
The value of CVarEndpointDenyListEnabled is set when the console variable is initialized, with a default value of true. It can be accessed and potentially modified at runtime using Unreal Engine’s console variable system.
CVarEndpointDenyListEnabled directly interacts with the GlobalDenyCandidateTable, which is likely responsible for maintaining the list of potentially problematic endpoints.
Developers should be aware that this variable is accessed using the GetValueOnAnyThread() method, which suggests it can be safely read from multiple threads.
Best practices for using CVarEndpointDenyListEnabled include:
- Use the console variable system to modify this value at runtime for debugging or testing purposes.
- Consider exposing this setting in a user-friendly manner if network administrators need to toggle this feature.
- Ensure that any code checking this variable is prepared to handle both true and false cases appropriately.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Messaging/UdpMessaging/Source/UdpMessaging/Private/Transport/UdpMessageTransport.cpp:31
Scope: file
Source code excerpt:
TAutoConsoleVariable<bool> CVarEndpointDenyListEnabled(
TEXT("MessageBus.UDP.EndpointDenyListEnabled"),
true,
TEXT("Specifies if the endpoint deny list is enabled. If enabled, a problematic endpoint will be tagged for possible exclusion from communication.")
TEXT("The maximum attempts allowed is determined by MessageBus.UDP.MaxRetriesForBadEndpoint"),
ECVF_Default
);
#Associated Variable and Callsites
This variable is associated with another variable named CVarEndpointDenyListEnabled
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Messaging/UdpMessaging/Source/UdpMessaging/Private/Transport/UdpMessageTransport.cpp:30
Scope: file
Source code excerpt:
);
TAutoConsoleVariable<bool> CVarEndpointDenyListEnabled(
TEXT("MessageBus.UDP.EndpointDenyListEnabled"),
true,
TEXT("Specifies if the endpoint deny list is enabled. If enabled, a problematic endpoint will be tagged for possible exclusion from communication.")
TEXT("The maximum attempts allowed is determined by MessageBus.UDP.MaxRetriesForBadEndpoint"),
ECVF_Default
);
#Loc: <Workspace>/Engine/Plugins/Messaging/UdpMessaging/Source/UdpMessaging/Private/Transport/UdpMessageTransport.cpp:535
Scope (from outer to inner):
file
function bool FUdpMessageTransport::HandleProcessorEndpointCheck
Source code excerpt:
bool FUdpMessageTransport::HandleProcessorEndpointCheck(const FGuid& EndpointNodeId, const FIPv4Endpoint& SenderEndpoint)
{
if (CVarEndpointDenyListEnabled.GetValueOnAnyThread())
{
if (!UE::UdpMessageTransport::Private::GlobalDenyCandidateTable.ShouldAllowEndpoint(EndpointNodeId))
{
return false;
}
}