From 59de256621b57a3f40984ffea41b8390392e01c7 Mon Sep 17 00:00:00 2001 From: ading2210 Date: Tue, 29 Oct 2024 20:43:44 -0700 Subject: [PATCH] increase libcurl's internal buffer size to 512kb --- CHANGELOG.md | 5 ++++- client/libcurl/request.c | 3 ++- client/package.json | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ef3ab6..b7cdfe3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Libcurl.js Changelog: -## v0.6.17 (10/2/24): +## v0.6.18 (10/29/24): +- Improve download speeds by increasing libcurl's internal buffer size and listening directly for websocket messages + +## v0.6.17 (10/24/24): - Enable a per host connection limit. This defaults to 6, which is the same as most web browsers. - Use the latest WolfSSL again and compile with workarounds - Upgrade to curl 8.10.1 diff --git a/client/libcurl/request.c b/client/libcurl/request.c index a6f7c20..b9e6f51 100644 --- a/client/libcurl/request.c +++ b/client/libcurl/request.c @@ -43,7 +43,8 @@ CURL* create_request(const char* url, int request_id, DataCallback data_callback curl_easy_setopt(http_handle, CURLOPT_PRIVATE, request_info); curl_easy_setopt(http_handle, CURLOPT_URL, url); - curl_easy_setopt(http_handle, CURLOPT_CAINFO_BLOB , cacert_blob); + curl_easy_setopt(http_handle, CURLOPT_CAINFO_BLOB, cacert_blob); + curl_easy_setopt(http_handle, CURLOPT_BUFFERSIZE, 512*1024); //callbacks to pass the response data back to js curl_easy_setopt(http_handle, CURLOPT_WRITEFUNCTION, &write_function); diff --git a/client/package.json b/client/package.json index 9144589..7e50bb8 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "libcurl.js", - "version": "0.6.17", + "version": "0.6.18", "description": "A port of libcurl to WebAssembly, for proxying HTTPS requests from the browser with full TLS encryption", "main": "libcurl.mjs", "exports": {