class
#include <core/net/address.hpp>
Address Represents an address, either IPv4 or IPv6.
Public static variables
Public static functions
- static auto fromIPv4(uint8_t a, uint8_t b, uint8_t c, uint8_t d) -> Address
- Constructs a new IPv4 address from four octets (
a.b.c.d
). - static auto fromIPv6(uint32_t a, uint32_t b, uint32_t c, uint32_t d) -> Address
- Constructs a new IPv6 address from four 32-bit integers (
a.b.c.d
). -
static auto from(const std::string& address) -> memory::
Opt<Address> - Converts the provided string value to an Address.
Constructors, destructors, conversion operators
Public functions
- auto toString() const -> std::string
- Converts the address value to a string.
Function documentation
static memory:: Opt<Address> cubos:: core:: net:: Address:: from(const std::string& address)
Converts the provided string value to an Address.
Parameters | |
---|---|
address | The address, either in IPv4/IPv6 format, or as a domain hostname. |
Returns | Address object, or nothing if could not resolve the provided address . |