ppsspp/Common/Net/Resolve.h
Henrik Rydgård 4f43cff5ca
Move fileutil, net, image loaders, ui to Common. (#13506)
* Move and rename file_util/fd_util to Common/File/FileUtil and DirListing

Let's also move net while we're at it.

Move the ZIM/PNG loaders over to Common.

Move the UI framework into Common

iOS buildfix

* Buildfix

* Buildfixes

* Apple buildfix

* This typo again..

* UWP buildfix

* Fix build of PPSSPPQt, such as it is (it's not in good condition...)

* Guess what? Another buildfix.
2020-10-04 20:48:47 +02:00

26 lines
535 B
C++

#pragma once
#include <string>
#include <vector>
struct addrinfo;
namespace net {
// Strictly only required on Win32, but all platforms should call it.
void Init();
void Shutdown();
enum class DNSType {
ANY = 0,
IPV4 = 1,
IPV6 = 2,
};
bool DNSResolve(const std::string &host, const std::string &service, addrinfo **res, std::string &error, DNSType type = DNSType::ANY);
void DNSResolveFree(addrinfo *res);
bool GetIPList(std::vector<std::string>& IP4s);
int inet_pton(int af, const char* src, void* dst);
} // namespace net