OSUtils::resolve()
This commit is contained in:
parent
69076f8a45
commit
86c87875a7
3 changed files with 54 additions and 1 deletions
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue