1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Added ability to fetch media from remote server (using cURL library)

This commit is contained in:
Ilya Zhuravlev 2012-12-14 15:30:17 +04:00
parent aa46e5c5e7
commit 3578e1d4a7
12 changed files with 278 additions and 49 deletions

View file

@ -41,3 +41,9 @@ std::string translatePassword(std::string playername, std::wstring password)
return pwd;
}
size_t curl_write_data(char *ptr, size_t size, size_t nmemb, void *userdata) {
std::ostringstream *stream = (std::ostringstream*)userdata;
size_t count = size * nmemb;
stream->write(ptr, count);
return count;
}