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. | |
| MACAddress & | operator= (const MACAddress &other) |
| Creates a copy of another address. | |
| MACAddress (const uint8 bytes[6]) | |
| Creates an address from 6 bytes. | |
| const uint8 * | getBytes () 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. | |
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.
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.
| 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 |
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 |
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 |
Returns true if this address is null (00-00-00-00-00-00).
| bool MACAddress::operator== | ( | const MACAddress & | other | ) | const |
| bool MACAddress::operator!= | ( | const MACAddress & | other | ) | const |