engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | Public 属性 | 静态 Public 属性 | 友元 | 所有成员列表
FIPv4Endpoint结构体 参考

Implements an endpoint for IPv4 networks. 更多...

#include <IPv4Endpoint.h>

Public 成员函数

 FIPv4Endpoint ()
 Default constructor.
 
 FIPv4Endpoint (const FIPv4Address &InAddress, uint16 InPort)
 Creates and initializes a new IPv4 endpoint with the specified NetID and port. 更多...
 
 FIPv4Endpoint (const TSharedPtr< FInternetAddr > &InternetAddr)
 Creates and initializes a new IPv4 endpoint from a given FInternetAddr object. 更多...
 
bool operator!= (const FIPv4Endpoint &Other) const
 Compares this IPv4 address with the given endpoint for inequality. 更多...
 
bool operator== (const FIPv4Endpoint &Other) const
 Compares this IPv4 endpoint with the given endpoint for equality. 更多...
 
TSharedRef< FInternetAddr > ToInternetAddr () const
 Converts this endpoint to an FInternetAddr object. 更多...
 
TSharedRef< FInternetAddr > ToInternetAddrIPV4 () const
 Converts this endpoint to an FInternetAddr object. 更多...
 
NETWORKING_API FString ToString () const
 Gets a string representation for this endpoint. 更多...
 
FText ToText () const
 Gets the display text representation. 更多...
 

静态 Public 成员函数

static NETWORKING_API void Initialize ()
 Initializes the IP endpoint functionality.
 
static NETWORKING_API bool Parse (const FString &EndpointString, FIPv4Endpoint &OutEndpoint)
 Converts a string to an IPv4 endpoint. 更多...
 

Public 属性

FIPv4Address Address
 Holds the endpoint's IP address.
 
uint16 Port
 Holds the endpoint's port number.
 

静态 Public 属性

static NETWORKING_API const FIPv4Endpoint Any
 Defines the wild card endpoint, which is 0.0.0.0:0
 

友元

uint32 GetTypeHash (const FIPv4Endpoint &Endpoint)
 Gets the hash for specified IPv4 endpoint. 更多...
 
FArchive & operator<< (FArchive &Ar, FIPv4Endpoint &Endpoint)
 Serializes the given endpoint from or into the specified archive. 更多...
 

详细描述

Implements an endpoint for IPv4 networks.

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

待办事项:
gmp: add IPv6 support and rename this to FIpEndpoint?

构造及析构函数说明

◆ FIPv4Endpoint() [1/2]

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

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

参数
InAddressThe endpoint's IP address.
InPortThe endpoint's port number.

◆ FIPv4Endpoint() [2/2]

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.

参数
InternetAddrThe Internet address.

成员函数说明

◆ operator!=()

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

Compares this IPv4 address with the given endpoint for inequality.

参数
OtherThe endpoint to compare with.
返回
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.

参数
OtherThe endpoint to compare with.
返回
true if the endpoints are equal, false otherwise.

◆ Parse()

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

Converts a string to an IPv4 endpoint.

参数
EndpointStringThe string to convert.
OutEndpointWill contain the parsed endpoint.
返回
true if the string was converted successfully, false otherwise.
参见
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.

返回
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.

返回
Internet address object representing this endpoint.

◆ ToString()

NETWORKING_API FString FIPv4Endpoint::ToString ( ) const

Gets a string representation for this endpoint.

返回
String representation.
参见
Parse, ToText

◆ ToText()

FText FIPv4Endpoint::ToText ( ) const
inline

Gets the display text representation.

返回
Text representation.
参见
ToString

友元及相关函数文档

◆ GetTypeHash

uint32 GetTypeHash ( const FIPv4Endpoint &  Endpoint)
friend

Gets the hash for specified IPv4 endpoint.

参数
EndpointThe endpoint to get the hash for.
返回
Hash value.

◆ operator<<

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

Serializes the given endpoint from or into the specified archive.

参数
ArThe archive to serialize from or into.
EndpointThe endpoint to serialize.
返回
The archive.

该结构体的文档由以下文件生成: