OSUtils::resolve()

This commit is contained in:
Adam Ierymenko 2015-04-20 16:07:38 -07:00
parent 69076f8a45
commit 86c87875a7
3 changed files with 54 additions and 1 deletions

View file

@ -40,6 +40,7 @@
#include <map>
#include "../node/Constants.hpp"
#include "../node/InetAddress.hpp"
#ifdef __WINDOWS__
#include <WinSock2.h>
@ -146,6 +147,16 @@ public:
*/
static int64_t getFileSize(const char *path);
/**
* Get IP (v4 and/or v6) addresses for a given host
*
* This is a blocking resolver.
*
* @param name Host name
* @return IP addresses in InetAddress sort order or empty vector if not found
*/
static std::vector<InetAddress> resolve(const char *name);
/**
* @return Current time in milliseconds since epoch
*/