UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FIPv4Endpoint Struct Reference

#include <IPv4Endpoint.h>

Public Member Functions

 FIPv4Endpoint ()
 
 FIPv4Endpoint (const FIPv4Address &InAddress, uint16 InPort)
 
 FIPv4Endpoint (const TSharedPtr< FInternetAddr > &InternetAddr)
 
bool operator== (const FIPv4Endpoint &Other) const
 
bool operator!= (const FIPv4Endpoint &Other) const
 
TSharedRef< FInternetAddrToInternetAddr () const
 
TSharedRef< FInternetAddrToInternetAddrIPV4 () const
 
NETWORKING_API FString ToString () const
 
FText ToText () const
 

Static Public Member Functions

static NETWORKING_API void Initialize ()
 
static NETWORKING_API bool Parse (const FString &EndpointString, FIPv4Endpoint &OutEndpoint)
 
static NETWORKING_API bool FromHostAndPort (const FString &HostAndPortString, FIPv4Endpoint &OutEndpoint)
 

Public Attributes

FIPv4Address Address
 
uint16 Port
 

Static Public Attributes

static NETWORKING_API const FIPv4Endpoint Any
 

Friends

FArchiveoperator<< (FArchive &Ar, FIPv4Endpoint &Endpoint)
 
uint32 GetTypeHash (const FIPv4Endpoint &Endpoint)
 

Detailed Description

Implements an endpoint for IPv4 networks.

An endpoint consists of an IPv4 address and a port number.

Constructor & Destructor Documentation

◆ FIPv4Endpoint() [1/3]

FIPv4Endpoint::FIPv4Endpoint ( )
inline

Default constructor.

◆ FIPv4Endpoint() [2/3]

FIPv4Endpoint::FIPv4Endpoint ( const FIPv4Address InAddress,
uint16  InPort 
)
inline

Creates and initializes a new IPv4 endpoint with the specified NetID and port.

Parameters
InAddressThe endpoint's IP address.
InPortThe endpoint's port number.

◆ FIPv4Endpoint() [3/3]

FIPv4Endpoint::FIPv4Endpoint ( const TSharedPtr< FInternetAddr > &  InternetAddr)
inline

Creates and initializes a new IPv4 endpoint from a given FInternetAddr object.

Note: this constructor will be removed after the socket subsystem has been refactored.

Parameters
InternetAddrThe Internet address.

Member Function Documentation

◆ FromHostAndPort()

bool FIPv4Endpoint::FromHostAndPort ( const FString &  HostAndPortString,
FIPv4Endpoint OutEndpoint 
)
static

Resolves a hostname and port to an IPv4 endpoint.

Parameters
HostAndPortStringThe host and port to resolve.
OutEndpointWill contain the resolved endpoint.
Returns
true if the host and port were parsed and resolved successfully, false otherwise.

◆ Initialize()

void FIPv4Endpoint::Initialize ( )
static

Initializes the IP endpoint functionality.

◆ operator!=()

bool FIPv4Endpoint::operator!= ( const FIPv4Endpoint Other) const
inline

Compares this IPv4 address with the given endpoint for inequality.

Parameters
OtherThe endpoint to compare with.
Returns
true if the endpoints are not equal, false otherwise.

◆ operator==()

bool FIPv4Endpoint::operator== ( const FIPv4Endpoint Other) const
inline

Compares this IPv4 endpoint with the given endpoint for equality.

Parameters
OtherThe endpoint to compare with.
Returns
true if the endpoints are equal, false otherwise.

◆ Parse()

bool FIPv4Endpoint::Parse ( const FString &  EndpointString,
FIPv4Endpoint OutEndpoint 
)
static

Converts a string to an IPv4 endpoint.

Parameters
EndpointStringThe string to convert.
OutEndpointWill contain the parsed endpoint.
Returns
true if the string was converted successfully, false otherwise.
See also
ToString

◆ ToInternetAddr()

TSharedRef< FInternetAddr > FIPv4Endpoint::ToInternetAddr ( ) const
inline

Converts this endpoint to an FInternetAddr object.

Note: this method will be removed after the socket subsystem is refactored.

Returns
Internet address object representing this endpoint.

◆ ToInternetAddrIPV4()

TSharedRef< FInternetAddr > FIPv4Endpoint::ToInternetAddrIPV4 ( ) const
inline

Converts this endpoint to an FInternetAddr object.

Note: this method will be removed after the socket subsystem is refactored.

Returns
Internet address object representing this endpoint.

◆ ToString()

FString FIPv4Endpoint::ToString ( ) const

Gets a string representation for this endpoint.

Returns
String representation.
See also
Parse, ToText

◆ ToText()

FText FIPv4Endpoint::ToText ( ) const
inline

Gets the display text representation.

Returns
Text representation.
See also
ToString

Friends And Related Symbol Documentation

◆ GetTypeHash

uint32 GetTypeHash ( const FIPv4Endpoint Endpoint)
friend

Gets the hash for specified IPv4 endpoint.

Parameters
EndpointThe endpoint to get the hash for.
Returns
Hash value.

◆ operator<<

FArchive & operator<< ( FArchive Ar,
FIPv4Endpoint Endpoint 
)
friend

Serializes the given endpoint from or into the specified archive.

Parameters
ArThe archive to serialize from or into.
EndpointThe endpoint to serialize.
Returns
The archive.

Member Data Documentation

◆ Address

FIPv4Address FIPv4Endpoint::Address

Holds the endpoint's IP address.

◆ Any

const FIPv4Endpoint FIPv4Endpoint::Any
static

Defines the wild card endpoint, which is 0.0.0.0:0

◆ Port

uint16 FIPv4Endpoint::Port

Holds the endpoint's port number.


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