Raised This Month: $155 Target: $400
 38% 

[ANY] SteamWorks


Post New Thread Reply   
 
Thread Tools Display Modes
Deathknife
AlliedModders Donor
Join Date: Aug 2014
Old 07-12-2017 , 19:24   Re: [ANY] SteamWorks
Reply With Quote #591

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); 
__________________
Deathknife is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 07-13-2017 , 00:28   Re: [ANY] SteamWorks
Reply With Quote #592

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); 
PHP Code:
int p 0;
do
{
    
SteamWorks_GetHTTPResponseBodySize(requestp);
} while (
== 0); 
That is truly god awful though; didn't even think about that one if it works... It's pretty clear you're going to hell if that ships anywhere though
KyleS is offline
fragnichtnach
Senior Member
Join Date: Oct 2008
Old 07-14-2017 , 00:22   Re: [ANY] SteamWorks
Reply With Quote #593

Code:
L 07/13/2017 - 21:17:06: [SM] Unable to load extension "SteamWorks.ext": Could not find interface: INativeInterface
What to do?
fragnichtnach is offline
fragnichtnach
Senior Member
Join Date: Oct 2008
Old 07-14-2017 , 00:27   Re: [ANY] SteamWorks
Reply With Quote #594

Quote:
Originally Posted by fragnichtnach View Post
Code:
L 07/13/2017 - 21:17:06: [SM] Unable to load extension "SteamWorks.ext": Could not find interface: INativeInterface
What to do?
Nevermind, found the answer in this thread after watching a second time.

Latest version from here doesn't return this error.
http://users.alliedmods.net/~kyles/builds/SteamWorks/
fragnichtnach is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:40.


Powered by vBulletin®
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Theme made by Freecode