System::Net::IPAddress class

IPAddress class

Represents the IP address. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

class IPAddress : public System::Object

Methods

MethodDescription
Equals(System::SharedPtr<Object>) overrideCompares objects using C# Object.Equals semantics.
get_AddressFamily()Returns the address family.
get_IsIPv4MappedToIPv6()Returns a value that indicates if the address is an IPv4 address and is mapped to an IPv6 address.
get_IsIPv6LinkLocal()Returns a value that indicates if the address is an IPv6 link-local address.
get_IsIPv6Multicast()Returns a value that indicates if the address is an global IPv6 multicast address.
get_IsIPv6SiteLocal()Returns a value that indicates if the address is an IPv6 site-local address.
get_IsIPv6Teredo()Returns a value that indicates if the address is an IPv6 Teredo address.
get_ScopeId()Gets the scope identifier of the IPv6 address.
GetAddressBytes()Returns a byte array of the IP address.
GetHashCode() const overrideAnalog of C# Object.GetHashCode() method. Enables hashing of custom objects.
GetImpl() constReturns a pointer to implementation.
static HostToNetworkOrder(int64_t)Converts the specified host byte order to the corresponding network byte order.
static HostToNetworkOrder(int32_t)Converts the specified host byte order to the corresponding network byte order.
static HostToNetworkOrder(int16_t)Converts the specified host byte order to the corresponding network byte order.
IPAddress(int64_t)Constructs a new instance.
IPAddress(System::ArrayPtr<uint8_t>, int64_t)Constructs a new instance.
IPAddress(System::ArrayPtr<uint8_t>)Constructs a new instance.
IPAddress()Constructs a new instance.
static IsLoopback(System::SharedPtr<IPAddress>)Returns a value that indicates if the specified address is a loopback address.
MapToIPv4()Maps the address to the IPv4 address.
MapToIPv6()Maps the address to the IPv6 address.
static NetworkToHostOrder(int64_t)Converts the specified network byte order to the corresponding host byte order.
static NetworkToHostOrder(int32_t)Converts the specified network byte order to the corresponding host byte order.
static NetworkToHostOrder(int16_t)Converts the specified network byte order to the corresponding host byte order.
static Parse(String)Converts a passed string to an instance of the IPAddress class.
set_ScopeId(int64_t)Sets the scope identifier of the IPv6 address.
SetImpl(ImplPtr)Sets a pointer to implementation.
ToString() const overrideAnalog of C# Object.ToString() method. Enables converting custom objects to string.
static TryParse(String, System::SharedPtr<IPAddress>&)Tries to convert a passed string to an instance of the IPAddress class.

Fields

FieldDescription
static AnyRTTI information.
static BroadcastThe IPv4 broadcast address.
static IPv6AnyThe IPv6 address that indicates if the server must listen all network interfaces.
static IPv6LoopbackThe IPv6 loopback address.
static IPv6NoneThe IPv6 address that indicates if the server mustn’t listen any network interface.
static LoopbackThe IPv4 loopback address.
static NoneThe IPv4 address that indicates if the server mustn’t listen any network interface.

Typedefs

TypedefDescription
ImplPtrA pointer to the implementation type.

See Also