ISocketSubsystem::GetAddressInfo

Gets the address information of the given hostname and outputs it into an array of resolvable addresses.

Windows
MacOS
Linux

Override Hierarchy

ISocketSubsystem::GetAddressInfo()

FSteamSocketsSubsystem::GetAddressInfo()

References

Module

Sockets

Header

/Engine/Source/Runtime/Sockets/Public/SocketSubsystem.h

Include

#include "SocketSubsystem.h"

Syntax

FAddressInfoResult GetAddressInfo
(
    const TCHAR * HostName,
    const TCHAR * ServiceName,
    EAddressInfoFlags QueryFlags,
    const FName ProtocolTypeName,
    ESocketType SocketType
)

Remarks

Gets the address information of the given hostname and outputs it into an array of resolvable addresses. It is up to the caller to determine which one is valid for their environment.

This function allows for specifying FNames for the protocol type, allowing for support of other platform protocols

Returns

the results structure containing the array of address results to this query

Parameters

Parameter

Description

HostName

string version of the queryable hostname or ip address

ServiceName

string version of a service name ("http") or a port number ("80")

QueryFlags

What flags are used in making the getaddrinfo call. Several flags can be used at once by bitwise OR-ing the flags together. Platforms are required to translate this value into a the correct flag representation.

ProtocolTypeName

Used to limit results from the call. Specifying None will search all valid protocols. Callers will find they rarely have to specify this flag.

SocketType

What socket type should the results be formatted for. This typically does not change any formatting results and can be safely left to the default value.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss