CTR Pia  4.11.3
Game Communication Engine
nn::pia::common::InetAddress Class Reference

Class that represents an Internet address. More...

+ Inheritance diagram for nn::pia::common::InetAddress:

Public Member Functions

 InetAddress ()
 Instantiates the object with default parameters (default constructor). Sets the IP address and port number being cleared to zero.
 
 InetAddress (u32 uiAddress, u16 uiPort)
 Instantiates the object and initializes it with the IP address and port number specified. More...
 
 InetAddress (const InetAddress &oInetAddress)
 Copy constructor. More...
 
 ~InetAddress ()
 Destroys the object.
 
u32 GetAddress () const
 Gets the IP address in host byte order. More...
 
void GetAddressString (String *pString) const
 Gets the address string notation. Address strings are represented in a format such as 255.255.255.255:80. More...
 
s64 GetKey () const
 Gets the key for comparison. More...
 
u16 GetPort () const
 Sets the port number in host byte order. More...
 
void Init ()
 Instantiates the object.
 
bool operator!= (const InetAddress &oInetAddress) const
 This is an equality operator. More...
 
bool operator< (const InetAddress &oInetAddress) const
 Comparison operator. More...
 
InetAddressoperator= (const InetAddress &oInetAddress)
 This is the assignment operator. More...
 
bool operator== (const InetAddress &oInetAddress) const
 This is an equality operator. More...
 
void SetAddress (const u32 uiAddress)
 Sets the IP address in host byte order. More...
 
void SetPort (const u16 ui16Port)
 Sets the port number in host byte order. More...
 
void Trace (u64 uiTraceFlag) const
 Prints information that is useful for debugging. More...
 

Detailed Description

Class that represents an Internet address.

This class contains information such as the IP address and port number.


Revision History:
2012-04-19 Initial version.

Constructor & Destructor Documentation

nn::pia::common::InetAddress::InetAddress ( u32  uiAddress,
u16  uiPort 
)

Instantiates the object and initializes it with the IP address and port number specified.

Parameters
[in]uiAddressThe IP address.
[in]uiPortSpecifies the port number.
nn::pia::common::InetAddress::InetAddress ( const InetAddress oInetAddress)

Copy constructor.

Parameters
[in]oInetAddressSpecifies the object being copied.

Member Function Documentation

u32 nn::pia::common::InetAddress::GetAddress ( ) const
inline

Gets the IP address in host byte order.

Returns
Returns the IP address set for this object (in host byte order).
See also
SetAddress
void nn::pia::common::InetAddress::GetAddressString ( String pString) const

Gets the address string notation. Address strings are represented in a format such as 255.255.255.255:80.

Parameters
[out]pStringSpecifies a pointer to the String object used to set the address string notation.
s64 nn::pia::common::InetAddress::GetKey ( ) const

Gets the key for comparison.

Returns
Returns the key for comparison.
u16 nn::pia::common::InetAddress::GetPort ( ) const
inline

Sets the port number in host byte order.

Returns
Returns the port number set for this object (in host byte order).
See also
SetPort
bool nn::pia::common::InetAddress::operator!= ( const InetAddress oInetAddress) const
inline

This is an equality operator.

Parameters
[in]oInetAddressSpecifies the object to compare.
Returns
Returns true if this object and the one being compared to are not the same; returns false otherwise.
bool nn::pia::common::InetAddress::operator< ( const InetAddress oInetAddress) const
inline

Comparison operator.

Parameters
[in]oInetAddressSpecifies the object to compare.
Returns
InetAddress& nn::pia::common::InetAddress::operator= ( const InetAddress oInetAddress)

This is the assignment operator.

Parameters
[in]oInetAddressThe object to assign.
Returns
See this object.
bool nn::pia::common::InetAddress::operator== ( const InetAddress oInetAddress) const
inline

This is an equality operator.

Parameters
[in]oInetAddressSpecifies the object to compare.
Returns
Returns true if this object and the one being compared to are the same; returns false otherwise.
void nn::pia::common::InetAddress::SetAddress ( const u32  uiAddress)
inline

Sets the IP address in host byte order.

Parameters
[in]uiAddressSpecifies the IP address (in host byte order).
See also
GetAddress
void nn::pia::common::InetAddress::SetPort ( const u16  ui16Port)
inline

Sets the port number in host byte order.

Parameters
[in]ui16PortSpecifies the port number (in host byte order).
See also
GetPort
void nn::pia::common::InetAddress::Trace ( u64  uiTraceFlag) const

Prints information that is useful for debugging.

Parameters
[in]uiTraceFlagBitwise OR of trace flags. For more information, see the TraceFlag type.