JUCE
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
IPAddress Class Reference

An IPV4 address. More...

Public Member Functions

 IPAddress () noexcept
 Creates a null address (0.0.0.0). More...
 
 IPAddress (const uint8 bytes[4]) noexcept
 Creates an address from 4 bytes. More...
 
 IPAddress (uint8 address1, uint8 address2, uint8 address3, uint8 address4) noexcept
 Creates an address from 4 bytes. More...
 
 IPAddress (uint32 asNativeEndian32Bit) noexcept
 Creates an address from a packed 32-bit integer, where the MSB is the first number in the address, and the LSB is the last. More...
 
 IPAddress (const String &address)
 Parses a string IP address of the form "a.b.c.d". More...
 
String toString () const
 Returns a dot-separated string in the form "1.2.3.4". More...
 
bool operator== (const IPAddress &other) const noexcept
 
bool operator!= (const IPAddress &other) const noexcept
 

Static Public Member Functions

static void findAllAddresses (Array< IPAddress > &results)
 Populates a list of all the IP addresses that this machine is using. More...
 
static IPAddress any () noexcept
 Returns an address meaning "any" (0.0.0.0) More...
 
static IPAddress broadcast () noexcept
 Returns an address meaning "broadcast" (255.255.255.255) More...
 
static IPAddress local () noexcept
 Returns an address meaning "localhost" (127.0.0.1) More...
 

Public Attributes

uint8 address [4]
 The elements of the IP address. More...
 

Detailed Description

An IPV4 address.

Constructor & Destructor Documentation

IPAddress::IPAddress ( )
noexcept

Creates a null address (0.0.0.0).

IPAddress::IPAddress ( const uint8  bytes[4])
explicitnoexcept

Creates an address from 4 bytes.

IPAddress::IPAddress ( uint8  address1,
uint8  address2,
uint8  address3,
uint8  address4 
)
noexcept

Creates an address from 4 bytes.

IPAddress::IPAddress ( uint32  asNativeEndian32Bit)
explicitnoexcept

Creates an address from a packed 32-bit integer, where the MSB is the first number in the address, and the LSB is the last.

IPAddress::IPAddress ( const String address)
explicit

Parses a string IP address of the form "a.b.c.d".

Member Function Documentation

static void IPAddress::findAllAddresses ( Array< IPAddress > &  results)
static

Populates a list of all the IP addresses that this machine is using.

String IPAddress::toString ( ) const

Returns a dot-separated string in the form "1.2.3.4".

static IPAddress IPAddress::any ( )
staticnoexcept

Returns an address meaning "any" (0.0.0.0)

static IPAddress IPAddress::broadcast ( )
staticnoexcept

Returns an address meaning "broadcast" (255.255.255.255)

static IPAddress IPAddress::local ( )
staticnoexcept

Returns an address meaning "localhost" (127.0.0.1)

bool IPAddress::operator== ( const IPAddress other) const
noexcept
bool IPAddress::operator!= ( const IPAddress other) const
noexcept

Member Data Documentation

uint8 IPAddress::address[4]

The elements of the IP address.


The documentation for this class was generated from the following file: