#include <dns.h>
Public Types | |
typedef std::map< std::string, int > | HostMap |
enum | DNSError { DNS_COULD_NOT_CONNECT = 1, DNS_NO_HOSTS_FOUND, DNS_COULD_NOT_RESOLVE } |
Static Public Member Functions | |
static HostMap | resolve (const std::string &service, const std::string &proto, const std::string &domain) |
static HostMap | resolve (const std::string &domain) |
static int | connect (const std::string &domain) |
static int | connect (const std::string &domain, int port) |
You should not need to use these functions directly.
Definition at line 53 of file dns.h.
|
A list of strings (used for server addresses) and ints (used for port numbers). |
|
Possible errors occuring while resolving and connecting. |
|
This is a convenience function which uses connects to the given host and port. No SRV records are resolved. Use this function for special setups.
Definition at line 217 of file dns.cpp. References DNS::DNS_COULD_NOT_CONNECT, and DNS::DNS_COULD_NOT_RESOLVE. |
|
This is a convenience function which uses resolve() to get a list of hosts and connects to one of them.
Definition at line 162 of file dns.cpp. References DNS::DNS_COULD_NOT_RESOLVE, DNS::DNS_NO_HOSTS_FOUND, and DNS::resolve(). Referenced by Connection::connect(). |
|
This is a convenience funtion which uses resolve() to resolve SRV records for a given domain, using a service of xmpp and a proto of tcp.
Definition at line 65 of file dns.cpp. References DNS::resolve(). |
|
This funtion resolves a service/protocol/domain tuple.
Definition at line 73 of file dns.cpp. Referenced by DNS::connect(), and DNS::resolve(). |