remove emscripten socket file descriptor limit

This commit is contained in:
ading2210 2024-03-13 14:18:56 -04:00
parent 45b0084c79
commit a282734c13
6 changed files with 58 additions and 5 deletions

9
client/libcurl/ftp.c Normal file
View file

@ -0,0 +1,9 @@
#include "curl/curl.h"
#include "types.h"
#include "util.h"
void ftp_set_options(CURL* http_handle, const char* url, int no_body) {
curl_easy_setopt(http_handle, CURLOPT_NOBODY, (long) no_body);
curl_easy_setopt(http_handle, CURLOPT_URL, url);
}

View file

@ -119,11 +119,6 @@ void init_curl() {
curl_global_init(CURL_GLOBAL_DEFAULT);
multi_handle = curl_multi_init();
//emscripten has a fairly low file descriptor limit which means
//we must limit the total number of active tcp connections
curl_multi_setopt(multi_handle, CURLMOPT_MAX_TOTAL_CONNECTIONS, 50L);
curl_multi_setopt(multi_handle, CURLMOPT_MAXCONNECTS, 40L);
cacert_blob.data = _cacert_pem;
cacert_blob.len = _cacert_pem_len;
cacert_blob.flags = CURL_BLOB_NOCOPY;

View file