|
| static Address | createIp4 (const char *scheme, const char *ip, const char *port, const char *path) noexcept |
| | Constructs an Address object from IP4.
|
| static Address | createIp6 (const char *scheme, const char *ip, const char *port, const char *path) noexcept |
| | Constructs an Address object from IP6.
|
| static Address | createURL (const char *scheme, const char *hostname, const char *port, const char *path) noexcept |
| | Constructs an Address object from hostname.
|
| static std::vector< Address > | toAddress (const char *urls) |
| | Parses a space-separated list of URLs into a vector of Address objects.
|
| static bool | tryParseHostnameAddress (const std::string &url, std::string &hostname, std::string &port) |
| | Tries to parse a hostname address from a URL string.
|
◆ createIp4()
| Address kmMqtt::mqtt::Address::createIp4 |
( |
const char * | scheme, |
|
|
const char * | ip, |
|
|
const char * | port, |
|
|
const char * | path ) |
|
inlinestaticnoexcept |
Constructs an Address object from IP4.
- Parameters
-
| scheme | The scheme of the address (e.g., "mqtt", "ws"). |
| ip | The IP address. |
| port | The port number. |
| path | The path component of the address. |
- Returns
- Address object.
◆ createIp6()
| Address kmMqtt::mqtt::Address::createIp6 |
( |
const char * | scheme, |
|
|
const char * | ip, |
|
|
const char * | port, |
|
|
const char * | path ) |
|
inlinestaticnoexcept |
Constructs an Address object from IP6.
- Parameters
-
| scheme | The scheme of the address (e.g., "mqtt", "ws"). |
| ip | The IP address. |
| port | The port number. |
| path | The path component of the address. |
- Returns
- Address object.
◆ createURL()
| Address kmMqtt::mqtt::Address::createURL |
( |
const char * | scheme, |
|
|
const char * | hostname, |
|
|
const char * | port, |
|
|
const char * | path ) |
|
inlinestaticnoexcept |
Constructs an Address object from hostname.
- Parameters
-
| scheme | The scheme of the address (e.g., "mqtt", "ws"). |
| hostname | The hostname. |
| port | The port number. |
| path | The path component of the address. |
- Returns
- Address object.
◆ toAddress()
| std::vector< Address > kmMqtt::mqtt::Address::toAddress |
( |
const char * | urls | ) |
|
|
inlinestatic |
Parses a space-separated list of URLs into a vector of Address objects.
Supports IP4, IP6, and hostname formats.
- Parameters
-
| urls | A space-separated string of URLs. |
- Returns
- vector of address objects.
◆ tryParseHostnameAddress()
| bool kmMqtt::mqtt::Address::tryParseHostnameAddress |
( |
const std::string & | url, |
|
|
std::string & | hostname, |
|
|
std::string & | port ) |
|
inlinestatic |
Tries to parse a hostname address from a URL string.
- Parameters
-
| url | The URL string to parse. |
| hostname | Output parameter for the parsed hostname. |
| port | Output parameter for the parsed port. |
- Returns
- true if parsing was successful, false otherwise.
The documentation for this struct was generated from the following file: