[ANY] Async - Efficient event based HTTPS client. HTTP2 and Compression supported
Async
An HTTP(S) client focused on ease of use, performance, and stability. We moved to Github. Source Code: https://github.com/bottiger1/sourcemod-async Include: https://github.com/bottiger1/sourcem...pawn/async.inc Binary: https://github.com/bottiger1/sourcemod-async/releases Updates May 7, 2024 Another major update. Project has been updated for 64 bits. New binaries will be 64 bit only due to how annoying it is to compile. November 13, 2019 This is a major update. Everything has been moved to Github. Libraries have all been updated and HTTP2 and Brotli compression is now supported. You can also have the extension gzip post data outside the game thread. PHP Code:
PHP Code:
Unlike the other CURL based HTTP clients here that spawn a thread for each request, this extension spawns only 1 thread and handles all requests through an event loop. One may think 1 thread is worse than 8 threads, but http requests are mostly limited by network speed and not cpu. By using the same thread for the requests, it cuts down on context switching overhead. This is why many benchmarks show that single threaded network loops are often faster than ones that just spawn 1 thread per request. It is also safer. If you spawn 100 threads, it will take a lot of memory. Example Code:
#include <async> Usage Notes
Why another HTTP client? As I am writing this there are currently 3 options. There are problems with each one as described here. https://forums.alliedmods.net/showthread.php?t=232396
How to Compile Compiling this extension is really annoying. I have tried to write notes on how to do this in readme.txt. My releases are compiled in Ubuntu 18.04 x64. Changelog Code:
11/13/2019 |
Re: [ANY] Async - Efficient event based HTTP client
Quote:
The Steamworks extension is built against the SW SDK, and makes use of a version safe interface that was designed for the exact use-case it fulfills. |
Re: [ANY] Async - Efficient event based HTTP client
So, this is basically just a slimmed down version of the Curl extension?
|
Re: [ANY] Async - Efficient event based HTTP client
Quote:
http://osw.didrole.com/diff.php https://github.com/SteamRE/open-stea.../master?page=2 Even if Steamworks is public now you still have this problem and extensions need to be built and re-built for games using different versions of Steamworks. There is also the fact that the Steam HTTP doesn't support ECDSA, something that was in OpenSSL 3 years ago. Quote:
And it does not use Sourcemod handles which has a limit of 16k which is easily reached if you use plugins like tf2itemsinfo. This could have been one of the reasons why the old curl extension was failing after a long period of time. |
Re: [ANY] Async - Efficient event based HTTP client
Quote:
|
Re: [ANY] Async - Efficient event based HTTP client
Quote:
"Safe" interfaces isn't a guarantee that everything will continue to work. It only means that it won't crash. Valve can still deprecate old interfaces so that they don't work. I have personally experienced this problem. Even Kyles includes a steamclient download and tells people to install it. https://forums.alliedmods.net/showthread.php?t=229556 I don't know about everyone else, but I would prefer not to replace a file that can get clobbered by an update or worry about the game using a new interface not included in Kyles' version. |
Re: [ANY] Async - Efficient event based HTTP client
Quote:
|
Re: [ANY] Async - Efficient event based HTTP client
Quote:
The HTTP interface has only changed twice but it has changed. |
Re: [ANY] Async - Efficient event based HTTP client
Removed C++0x requirement. Download the newest version if you had troubles loading it.
|
Re: [ANY] Async - Efficient event based HTTP client
Quote:
Boost is almost always a significant regression in any project. |
All times are GMT -4. The time now is 01:32. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.