UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
AddressInfoTypes.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "IPAddress.h"
7#include "SocketTypes.h"
8
9class FInternetAddr;
10
12{
13 /* Return all addresses regardless of spec. */
14 AllResults = 1 << 0,
15 /* Don't use DNS resolution of the string (AI_NUMERICHOST),
16 * this makes the address resolution non-blocking, requiring
17 * the hostname to be in the form of an ip address already
18 */
19 NoResolveHost = 1 << 1,
20 /* Don't resolve the service name (requires the service argument to be nullptr
21 * or a string based representation of a number). This is also-nonblocking.
22 */
23 NoResolveService = 1 << 2,
24 /* Only return addresses that adapters on this machine can use (AI_ADDRCONFIG) */
25 OnlyUsableAddresses = 1 << 3,
26 /* Return bindable addresses (AI_PASSIVE). Only works if the hostname argument is null. */
27 BindableAddress = 1 << 4,
28 /* Include the canonical name of the host with the results list */
29 CanonicalName = 1 << 5,
30 /* Include the fully qualified domain name of the host with the results list */
31 FQDomainName = 1 << 6,
32 /* Allow for IPv4 mapped IPv6 addresses */
34 /* Get all addresses, but return V4 mapped IPv6 addresses */
36 /* The default value of a hints flag for the platform (typically just 0) */
37 Default = 0,
38};
39
41
43{
44 UE_DEPRECATED(4.23, "Use constructor that supports an FName as the AddressProtocol property is now deprecated. AddressProtocolName supports multiple protocol types as should be used instead.")
53
62
64 {
65 switch (SocketConfiguration)
66 {
68 return NAME_DGram;
69 break;
71 return NAME_Stream;
72 break;
73 default:
75 return NAME_None;
76 break;
77 }
78 }
79
81 {
82 return SocketConfiguration == rhs.SocketConfiguration &&
83 AddressProtocolName == rhs.AddressProtocolName &&
84 *Address == *(rhs.Address);
85 }
86
87 /* The protocol of the address stored */
89 /* The protocol name of the address stored */
91 /* Streaming or datagram */
93 /* Length of the returned address data */
95 /* The address associated with this result */
97};
98
100{
107
108 /* The hostname/ip that generated these results */
110 /* The service name that was used in the query */
112 /* The Canonical Name of the query (empty unless FQDomainName or CanonicalName are specified) */
114 /* The return code of the query */
116 /* The list of results */
118};
119
OODEFFUNC typedef void(OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)(void *ptr)
EAddressInfoFlags
Definition AddressInfoTypes.h:12
TFunction< void(FAddressInfoResult)> FAsyncGetAddressInfoCallback
Definition AddressInfoTypes.h:120
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
FPlatformTypes::SIZE_T SIZE_T
An unsigned integer the same size as a pointer, the same as UPTRINT.
Definition Platform.h:1150
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define ENUM_CLASS_FLAGS(Enum)
Definition EnumClassFlags.h:6
ESocketErrors
Definition SocketErrors.h:9
@ SE_NO_DATA
Definition SocketErrors.h:61
ESocketProtocolFamily
Definition SocketTypes.h:16
ESocketType
Definition SocketTypes.h:33
@ SOCKTYPE_Unknown
Definition SocketTypes.h:35
@ SOCKTYPE_Streaming
Definition SocketTypes.h:39
@ SOCKTYPE_Datagram
Definition SocketTypes.h:37
uint16_t uint16
Definition binka_ue_file_header.h:7
Definition IPAddress.h:22
Definition NameTypes.h:617
Definition Array.h:670
Definition AndroidPlatformMisc.h:14
Definition SharedPointer.h:153
Definition AddressInfoTypes.h:43
bool operator==(const FAddressInfoResultData &rhs) const
Definition AddressInfoTypes.h:80
TSharedRef< FInternetAddr > Address
Definition AddressInfoTypes.h:96
FName AddressProtocolName
Definition AddressInfoTypes.h:90
ESocketType SocketConfiguration
Definition AddressInfoTypes.h:92
SIZE_T AddressLen
Definition AddressInfoTypes.h:94
FName GetSocketTypeName() const
Definition AddressInfoTypes.h:63
FAddressInfoResultData(TSharedRef< FInternetAddr > InAddr, SIZE_T InAddrLen, const FName InProtocol, ESocketType InSocketConfiguration)
Definition AddressInfoTypes.h:54
ESocketProtocolFamily AddressProtocol
Definition AddressInfoTypes.h:88
Definition AddressInfoTypes.h:100
ESocketErrors ReturnCode
Definition AddressInfoTypes.h:115
TArray< FAddressInfoResultData > Results
Definition AddressInfoTypes.h:117
FString QueryHostName
Definition AddressInfoTypes.h:109
FAddressInfoResult(const TCHAR *InHostName, const TCHAR *InServiceName)
Definition AddressInfoTypes.h:101
FString CanonicalNameResult
Definition AddressInfoTypes.h:113
FString QueryServiceName
Definition AddressInfoTypes.h:111