update curl/wolfssl, add per host connection limit

This commit is contained in:
ading2210 2024-10-24 04:54:00 -04:00
parent c1b78e1d0c
commit 5579550b8d
8 changed files with 15 additions and 9 deletions

View file

@ -27,9 +27,10 @@ void session_perform(struct SessionInfo *session) {
}
}
void session_set_options(struct SessionInfo *session, int connections_limit, int cache_limit) {
void session_set_options(struct SessionInfo *session, int connections_limit, int cache_limit, int host_conn_limit) {
curl_multi_setopt(session->multi_handle, CURLMOPT_MAX_TOTAL_CONNECTIONS, connections_limit);
curl_multi_setopt(session->multi_handle, CURLMOPT_MAXCONNECTS, cache_limit);
curl_multi_setopt(session->multi_handle, CURLMOPT_MAX_HOST_CONNECTIONS, host_conn_limit);
}
void session_add_request(struct SessionInfo *session, CURL* http_handle) {