gloox
1.0
|
#include <dns.h>
Public Types | |
typedef std::map< std::string, int > | HostMap |
Static Public Member Functions | |
static HostMap | resolve (const std::string &service, const std::string &proto, const std::string &domain, const LogSink &logInstance) |
static HostMap | resolve (const std::string &domain, const LogSink &logInstance) |
static int | connect (const std::string &host, const LogSink &logInstance) |
static int | connect (const std::string &host, int port, const LogSink &logInstance) |
static int | getSocket (const LogSink &logInstance) |
static void | closeSocket (int fd, const LogSink &logInstance) |
This class holds a number of static functions used for DNS related stuff.
You should not need to use these functions directly.
typedef std::map<std::string, int> HostMap |
void closeSocket | ( | int | fd, |
const LogSink & | logInstance | ||
) | [static] |
This is a convenience function which connects to the given host and port. No SRV records are resolved. Use this function for special setups.
host | The host/IP address to connect to. |
port | A custom port to connect to. |
logInstance | A LogSink to use for logging. |
DNS::HostMap resolve | ( | const std::string & | service, |
const std::string & | proto, | ||
const std::string & | domain, | ||
const LogSink & | logInstance | ||
) | [static] |
This function resolves a service/protocol/domain tuple.
service | The SRV service type. |
proto | The SRV protocol. |
domain | The domain to search for SRV records. |
logInstance | A LogSink to use for logging. |
This is a convenience funtion which uses resolve() to resolve SRV records for a given domain, using a service of xmpp-client and a proto of tcp.
domain | The domain to resolve SRV records for. |
logInstance | A LogSink to use for logging. |