mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-01-09 23:10:49 +00:00
ffb6a41d08
Fixes http::Client destructing after net::Shutdown(), calling freeaddrinfo() too late.
31 lines
601 B
C++
31 lines
601 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
struct addrinfo;
|
|
|
|
namespace net {
|
|
|
|
// Strictly only required on Win32, but all platforms should call it.
|
|
void Init();
|
|
void Shutdown();
|
|
|
|
struct AutoInit {
|
|
AutoInit() {
|
|
Init();
|
|
}
|
|
~AutoInit() {
|
|
Shutdown();
|
|
}
|
|
};
|
|
|
|
// use free() to free the returned string.
|
|
char *DNSResolveTry(const char *host, const char **err);
|
|
char *DNSResolve(const char *host);
|
|
|
|
bool DNSResolve(const std::string &host, const std::string &service, addrinfo **res, std::string &error);
|
|
void DNSResolveFree(addrinfo *res);
|
|
|
|
int inet_pton(int af, const char* src, void* dst);
|
|
} // namespace net
|