diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2015-08-27 21:06:09 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2015-08-27 21:06:09 +0100 |
commit | 5990344cb07858b4cd104eacb8d1b9bb38fa6ff7 (patch) | |
tree | e4125cca97cd3f34e8fadf1111513c78ac168730 /src/common/dns_utils.cpp | |
parent | Merge pull request #390 (diff) | |
download | monero-5990344cb07858b4cd104eacb8d1b9bb38fa6ff7.tar.xz |
dns: make ctor private
This ensures one can't instanciate a DNSResolver object by
mistake, but uses the singleton. A separate create static
function is added for cases where a new object is explicitely
needed.
Diffstat (limited to 'src/common/dns_utils.cpp')
-rw-r--r-- | src/common/dns_utils.cpp | 5 |
1 files changed, 5 insertions, 0 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. |