JUCE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Static Public Member Functions | List of all members
MACAddress Class Reference

A wrapper for a streaming (TCP) socket. More...

Public Member Functions

 MACAddress ()
 Creates a null address (00-00-00-00-00-00).
 
 MACAddress (const MACAddress &other)
 Creates a copy of another address.
 
MACAddressoperator= (const MACAddress &other)
 Creates a copy of another address.
 
 MACAddress (const uint8 bytes[6])
 Creates an address from 6 bytes.
 
const uint8getBytes () const noexcept
 Returns a pointer to the 6 bytes that make up this address.
 
String toString () const
 Returns a dash-separated string in the form "11-22-33-44-55-66".
 
int64 toInt64 () const noexcept
 Returns the address in the lower 6 bytes of an int64.
 
bool isNull () const noexcept
 Returns true if this address is null (00-00-00-00-00-00).
 
bool operator== (const MACAddress &other) const noexcept
 
bool operator!= (const MACAddress &other) const noexcept
 

Static Public Member Functions

static void findAllAddresses (Array< MACAddress > &results)
 Populates a list of the MAC addresses of all the available network cards.
 

Detailed Description

A wrapper for a streaming (TCP) socket.

This allows low-level use of sockets; for an easier-to-use messaging layer on top of sockets, you could also try the InterprocessConnection class.

See Also
DatagramSocket, InterprocessConnection, InterprocessConnectionServer

Constructor & Destructor Documentation

MACAddress::MACAddress ( )

Creates a null address (00-00-00-00-00-00).

MACAddress::MACAddress ( const MACAddress other)

Creates a copy of another address.

MACAddress::MACAddress ( const uint8  bytes[6])
explicit

Creates an address from 6 bytes.

Member Function Documentation

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

Populates a list of the MAC addresses of all the available network cards.

MACAddress& MACAddress::operator= ( const MACAddress other)

Creates a copy of another address.

const uint8* MACAddress::getBytes ( ) const
noexcept

Returns a pointer to the 6 bytes that make up this address.

String MACAddress::toString ( ) const

Returns a dash-separated string in the form "11-22-33-44-55-66".

int64 MACAddress::toInt64 ( ) const
noexcept

Returns the address in the lower 6 bytes of an int64.

This uses a little-endian arrangement, with the first byte of the address being stored in the least-significant byte of the result value.

bool MACAddress::isNull ( ) const
noexcept

Returns true if this address is null (00-00-00-00-00-00).

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

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