Added some threading for URL calls for new masterserver game play

This commit is contained in:
Mark Vejvoda
2010-05-13 06:43:56 +00:00
parent 55d7c6eebc
commit 57d0420b76
7 changed files with 134 additions and 55 deletions

View File

@@ -68,6 +68,18 @@ size_t SystemFlags::httpWriteMemoryCallback(void *ptr, size_t size, size_t nmemb
return realsize;
}
std::string SystemFlags::escapeURL(std::string URL)
{
string result = URL;
char *escaped=curl_easy_escape(SystemFlags::curl_handle,URL.c_str(),0);
if(escaped != NULL) {
result = escaped;
curl_free(escaped);
}
return result;
}
std::string SystemFlags::getHTTP(std::string URL) {
curl_easy_setopt(SystemFlags::curl_handle, CURLOPT_URL, URL.c_str());