UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FUDPPing Class Reference

#include <Icmp.h>

Static Public Member Functions

static ICMP_API void UDPEcho (const FString &TargetAddress, float Timeout, FIcmpEchoResultCallback HandleResult)
 
static void UDPEcho (const FString &TargetAddress, float Timeout, FIcmpEchoResultDelegate ResultDelegate)
 
static ICMP_API void UDPEchoMany (const TArray< FIcmpTarget > &Targets, float Timeout, FIcmpEchoManyCompleteCallback CompletionCallback)
 
static ICMP_API void UDPEchoMany (const TArray< FIcmpTarget > &Targets, float Timeout, FIcmpEchoManyCompleteDelegate CompletionDelegate)
 

Member Function Documentation

◆ UDPEcho() [1/2]

void FUDPPing::UDPEcho ( const FString &  TargetAddress,
float  Timeout,
FIcmpEchoResultCallback  HandleResult 
)
static

Send an ICMP echo packet and wait for a reply.

The name resolution and ping send/receive will happen on a separate thread. The third argument is a callback function that will be invoked on the game thread after the a reply has been received from the target address, the timeout has expired, or if there was an error resolving the address or delivering the ICMP message to it.

Multiple pings can be issued concurrently and this function will ensure they're executed in turn in order not to mix ping replies from different nodes.

Parameters
TargetAddressthe target address to ping
Timeoutmax time to wait for a reply
HandleResulta callback function that will be called when the result is ready

◆ UDPEcho() [2/2]

static void FUDPPing::UDPEcho ( const FString &  TargetAddress,
float  Timeout,
FIcmpEchoResultDelegate  ResultDelegate 
)
inlinestatic

Send an ICMP echo packet and wait for a reply.

This is a wrapper around the above function, taking a delegate instead of a function argument.

Parameters
TargetAddressthe target address to ping
Timeoutmax time to wait for a reply
ResultDelegatea delegate that will be called when the result is ready

◆ UDPEchoMany() [1/2]

void FUDPPing::UDPEchoMany ( const TArray< FIcmpTarget > &  Targets,
float  Timeout,
FIcmpEchoManyCompleteCallback  CompletionCallback 
)
static

Send multiple ICMP echo packets and wait for replies.

Creates a new thread in which name resolution and ping send/receive are handled for all supplied target addresses. These are non-blocking requests, sent and received on a single network socket.

The third argument is a callback function that will be invoked on the game thread after all replies are received, timed out, or otherwise terminated (e.g. remote address could not be resolved, host unreachable, send failed, etc.). It passes a FIcmpEchoManyCompleteResult instance, containing the overall completion status, and the ping results obtained so far for all of the supplied targets.

Parameters
Targetsthe target addresses to ping
Timeoutmax time to wait for a replies
CompletionCallbackcallback function that is invoked when the final results are ready

◆ UDPEchoMany() [2/2]

void FUDPPing::UDPEchoMany ( const TArray< FIcmpTarget > &  Targets,
float  Timeout,
FIcmpEchoManyCompleteDelegate  CompletionDelegate 
)
static

Send multiple ICMP echo packets and wait for replies.

Creates a new thread in which name resolution and ping send/receive are handled for all supplied target addresses. These are non-blocking requests, sent and received on a single network socket.

The third argument is a callback function that will be invoked on the game thread after all replies are received, timed out, or otherwise terminated (e.g. remote address could not be resolved, host unreachable, send failed, etc.). It passes a FIcmpEchoManyCompleteResult instance, containing the overall completion status, and the ping results obtained so far for all of the supplied targets.

Parameters
Targetsthe target addresses to ping
Timeoutmax time to wait for a replies
CompletionDelegatedelegate that is invoked when the final results are ready

The documentation for this class was generated from the following files: