View Single Post
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 08-09-2017 , 21:23   Re: [ANY] SteamWorks
Reply With Quote #604

Quote:
Originally Posted by Deathknife View Post
Cheap workaround for "non-threaded call" (Wouldn't recommend ever doing this though)
PHP Code:
Handle request SteamWorks_CreateHTTPRequest(k_EHTTPMethodGET"https://www.google.com");
SteamWorks_SetHTTPCallbacks(requestHTTPCompletedINVALID_FUNCTIONHTTPReceive);

SteamWorks_SendHTTPRequest(request);
int p 0;
SteamWorks_GetHTTPResponseBodySize(requestp);
while(
== 0) {
    
SteamWorks_GetHTTPResponseBodySize(requestp);

the events are fired the next tick, but it's ready to use and you can get response data with callback easily after the while loop ends.
PHP Code:
SteamWorks_GetHTTPResponseBodyCallback(requestfCallbackdata); 
If the target url returns a blank page or is unreachable your gameserver is fucked
__________________
zipcore is offline