diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common/dns_utils.cpp | 5 | ||||
-rw-r--r-- | src/common/dns_utils.h | 11 |
2 files changed, 15 insertions, 1 deletions
diff --git a/src/common/dns_utils.cpp b/src/common/dns_utils.cpp index e442d3d81..8b7c9b4d9 100644 --- a/src/common/dns_utils.cpp +++ b/src/common/dns_utils.cpp @@ -334,6 +334,11 @@ DNSResolver& DNSResolver::instance() return *staticInstance; } +DNSResolver DNSResolver::create() +{ + return DNSResolver(); +} + bool DNSResolver::check_address_syntax(const char *addr) { // if string doesn't contain a dot, we won't consider it a url for now. diff --git a/src/common/dns_utils.h b/src/common/dns_utils.h index 1e726c80c..50e8001f1 100644 --- a/src/common/dns_utils.h +++ b/src/common/dns_utils.h @@ -49,7 +49,7 @@ struct DNSResolverData; */ class DNSResolver { -public: +private: /** * @brief Constructs an instance of DNSResolver @@ -58,6 +58,8 @@ public: */ DNSResolver(); +public: + /** * @brief takes care of freeing C pointers and such */ @@ -119,6 +121,13 @@ public: */ static DNSResolver& instance(); + /** + * @brief Gets a new instance of DNSResolver + * + * @return returns a pointer to the new object + */ + static DNSResolver create(); + private: /** |