#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 &domain, const LogSink &logInstance) |
static int | connect (const std::string &domain, unsigned short port, const LogSink &logInstance) |
static int | getSocket () |
static void | closeSocket (int fd) |
You should not need to use these functions directly.
Definition at line 55 of file dns.h.
typedef std::map<std::string, int> HostMap |
DNS::HostMap resolve | ( | const std::string & | service, | |
const std::string & | proto, | |||
const std::string & | domain, | |||
const LogSink & | logInstance | |||
) | [static] |
This funtion 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 and a proto of tcp.
domain | The domain to resolve SRV records for. | |
logInstance | A LogSink to use for logging. |
int connect | ( | const std::string & | domain, | |
const LogSink & | logInstance | |||
) | [static] |
int connect | ( | const std::string & | domain, | |
unsigned short | port, | |||
const LogSink & | logInstance | |||
) | [static] |
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.
domain | The domain to connect to. | |
port | A custom port to connect to. | |
logInstance | A LogSink to use for logging. |
int getSocket | ( | ) | [static] |
void closeSocket | ( | int | fd | ) | [static] |