NetServices: Implement controls on the number of concurrent requests.

This change allows the user to control how many concurrent request can be done
per session. This is going to be helpful to running the tests as well; they were
all fired up in parallel, which sometimes leads to our test server refusing a
connection.

Change-Id: I4f1f40b28b8e0199ea5589b36cd8d00ecd849a63
This commit is contained in:
Niels Sascha Reedijk
2022-07-27 09:02:09 +01:00
parent 251828d308
commit 9b33a931f1
4 changed files with 179 additions and 7 deletions
@@ -40,6 +40,10 @@ public:
void Cancel(int32 identifier);
void Cancel(const BHttpResult& request);
// Concurrency limits
void SetMaxConnectionsPerHost(size_t maxConnections);
void SetMaxHosts(size_t maxConnections);
private:
struct Redirect;
class Request;