OSUtils::resolve()
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user