FInternetAddr

Represents an internet address. All data is in network byte order

Windows
MacOS
Linux

References

Module

Sockets

Header

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

Include

#include "IPAddress.h"

Syntax

class FInternetAddr

Remarks

Represents an internet address. All data is in network byte order

Constructors

Name Description

Protected function

FInternetAddr()

Hidden on purpose

Destructors

Name Description

Public function Virtual

~FInternetAddr()

Functions

Name Description

Public function Const

TSharedRef< ...

 

Clone()

Creates a new structure with the same data as this structure

Public function Virtual Const

bool

 

CompareEndpoints

(
    const FInternetAddr& InAddr
)

Compares FInternetAddrs together, comparing the logical net addresses (endpoints) of the data stored, rather than doing a memory comparison like the equality operator does.

Public function Const

void

 

GetIp

(
    uint32& OutAddr
)

Copies the network byte order ip address to a host byte order dword

Public function Virtual Const

int32

 

GetPlatformPort()

Get platform specific port data.

Public function Virtual Const

void

 

GetPort

(
    int32& OutPort
)

Copies the port number from this address and places it into a host byte order int

Public function Const

int32

 

GetPort()

Returns the port number from this address in host byte order

Public function Virtual Const

FName

 

GetProtocolType()

Returns the protocol type name of the address data currently stored in this struct

Public function Const

TArray< uint...

 

GetRawIp()

Gets the ip address in a raw array stored in network byte order.

Public function Const

uint32

 

GetTypeHash()

Hash function for use with TMap's - exposed through FInternetAddrMapRef

Public function Const

bool

 

IsValid()

Is this a well formed internet address

Public function

void

 

SetAnyAddress()

Sets the address to be any address

Public function

void

 

SetBroadcastAddress()

Sets the address to broadcast

Public function

void

 

SetIp

(
    uint32 InAddr
)

Sets the ip address from a host byte order uint32

Public function

void

 

SetIp

(
    const TCHAR* InAddr,
    bool& bIsValid
)

Sets the ip address from a string ("A.B.C.D")

Public function

void

 

SetLoopbackAddress()

Sets the address to loopback

Public function Virtual

void

 

SetPlatformPort

(
    int32 InPort
)

Set Platform specific port data

Public function

void

 

SetPort

(
    int32 InPort
)

Sets the port number from a host byte order int

Public function

void

 

SetRawIp

(
    const TArray< uint8 >& RawAddr
)

Sets the ip address from a raw network byte order array.

Public function Const

FString

 

ToString

(
    bool bAppendPort
)

Converts this internet ip address to string form

Operators

Name Description

Public function Virtual Const

bool

 

operator==

(
    const FInternetAddr& Other
)

Compares two internet ip addresses for equality

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