Commit Graph

848 Commits

Author SHA1 Message Date
BV-WebDev
2aff4e4bf4 Clean up onDataV2 and collectBody code, and update their documentation (#1256) 2026-03-26 20:08:48 +01:00
BV-WebDev
0b0c8f90d3 Add DataView support, update RecognizedString type (#1258) 2026-03-26 20:08:34 +01:00
BV-WebDev
1c03fa0b79 DeclarativeResponse: add SharedArrayBuffer support (#1259) 2026-03-26 20:08:20 +01:00
uNetworkingAB
54e822d6f7 Update installation command to version 20.61.0 2026-03-24 21:48:18 +01:00
Alex Hultman
1354561528 Update docs 2026-03-20 21:21:31 +01:00
Copilot
a824b074e2 fix: remove declare modifier from ambient namespace in index.d.ts (#1254)
* Initial plan

* fix: remove declare modifier in ambient namespace context in index.d.ts

Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>
Agent-Logs-Url: https://github.com/uNetworking/uWebSockets.js/sessions/9f94a53f-390c-4776-86e8-a6cb39afefcf

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>
2026-03-20 21:20:12 +01:00
Copilot
f7ddbb9872 Fix onDataV2 TypeScript docs to match C++ implementation (#1253)
* Initial plan

* Update TypeScript docs to match C++ wrapper: rename onFullData→collectBody, onStream→onDataV2, remove maxRemainingBodyLength

Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>
Agent-Logs-Url: https://github.com/uNetworking/uWebSockets.js/sessions/f459a9d8-e6c7-4fa9-b18f-011b2c04cc2e

* Fix onDataV2 docstring: use accurate lead sentence and add missing JS-object-invalidation note

Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>
Agent-Logs-Url: https://github.com/uNetworking/uWebSockets.js/sessions/723e9a43-c147-497d-a65e-685a5ea63cd4

* Add onDataV2 method for enhanced HTTP request handling

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>
2026-03-20 21:02:22 +01:00
Alex Hultman
d0a49aa803 Bump uWS, update wrappers 2026-03-20 20:10:50 +01:00
Copilot
78062d0052 Update uWebSockets submodule and enable UWS_REMOTE_ADDRESS_USERSPACE (#1251)
* Initial plan

* Update uWebSockets submodule and define UWS_REMOTE_ADDRESS_USERSPACE in build.c

Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>
2026-03-16 18:26:05 +01:00
Copilot
5ff1c5497b Implement onStream: unified body streaming + abort callback (#1246)
* Initial plan

* Implement onStream C++ function and add TypeScript type definition

Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>
2026-03-15 12:43:55 +01:00
uNetworkingAB
23d0f7a32a Fix WebSocket send function buffer handling
Refactor WebSocket send function to handle ArrayBuffer and ArrayBufferView correctly.
2026-03-15 02:07:59 +01:00
uNetworkingAB
fb05cc7ccf Fix send_fast_buffer to use correct opcode 2026-03-15 01:55:59 +01:00
uNetworkingAB
e3ff2c441e Add debug print statement for fast buffer path 2026-03-15 01:37:14 +01:00
uNetworkingAB
9593774f70 Fix fast_send function reference in WebSocketWrapper 2026-03-15 01:27:35 +01:00
uNetworkingAB
1786528aaf Add fast send methods for strings and buffers 2026-03-15 01:17:39 +01:00
uNetworkingAB
3f16489c5c Change ConstructorBehavior for WebSocket send method 2026-03-15 01:03:41 +01:00
uNetworkingAB
bbdd3d30d9 Try this 2026-03-15 00:43:28 +01:00
uNetworkingAB
5d15b9e75c Update fast_send to use fallback support 2026-03-15 00:21:18 +01:00
uNetworkingAB
8c94af5867 Change WebSocket send method to use FastOneByteString 2026-03-14 23:54:47 +01:00
uNetworkingAB
6ccdfbcbb8 Delete src/v8-fast-api-calls.h 2026-03-14 23:16:22 +01:00
Copilot
7c1272e536 Add V8 fast call path for WebSocket.send (#1242)
* Initial plan

* Implement V8 fast call API for hot-path WebSocket and HTTP response functions

Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>

* Pare back V8 fast call to WebSocketWrapper.send only

Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>
2026-03-14 22:51:49 +01:00
Copilot
f9df4260f3 Fetch version-matched v8-fast-api-calls.h for each Node.js target in prepare() (#1241)
* Initial plan

* Download correct v8-fast-api-calls.h for each Node.js version in prepare()

Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>
2026-03-14 22:20:12 +01:00
uNetworkingAB
76769b3a2c Call onAborted from onFullData
Capture the response object and handle abortion in onFullData.
2026-03-12 15:31:06 +01:00
uNetworkingAB
8bc7242dfd onFullData is not available for H3 2026-03-12 10:10:50 +01:00
uNetworkingAB
379ffb7735 Too much JS 2026-03-12 09:44:41 +01:00
uNetworkingAB
01328547ba Preallocate in onFullData
Refactor onData callback to include response object and preallocate buffer size.
2026-03-12 09:43:03 +01:00
Copilot
64b8e58f47 Add maxRemainingBodyLength() wrapper and update uWebSockets submodule (#1237)
* Initial plan

* Add maxRemainingBodyLength wrapper and update uWebSockets submodule

Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>
2026-03-12 09:21:05 +01:00
uNetworkingAB
e1e8339103 Remove ASAN test execution step from build workflow
Removed ASAN test execution from workflow.
2026-03-12 08:44:12 +01:00
uNetworkingAB
6b60ec986e Update ASAN test command in build workflow 2026-03-11 23:34:39 +01:00
Copilot
a423b85358 Move environment variable docs from README to TypeScript definitions (#1236)
* Initial plan

* Move environment variable docs from README to TypeScript definitions

Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>
2026-03-11 23:32:46 +01:00
uNetworkingAB
edcd266a27 Add ASAN test execution to build workflow 2026-03-11 23:14:29 +01:00
uNetworkingAB
2c9ef41c3f Remove split-binaries job from build.yml
Removed the split-binaries job from the build workflow.
2026-03-11 22:54:24 +01:00
Copilot
e82d3566cd build.c: use C macros + string literal concatenation for ASAN flags (#1235)
* Initial plan

* Add ASAN binary builds targeting binaries-asan branch

Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>

* Refactor ASAN flags in build.c to use C macros and string concatenation

Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>
2026-03-11 21:55:17 +01:00
Copilot
3d3dd051ca Revert "Add HttpResponse.writeHeaders" (#1234)
* Initial plan

* Revert "Add HttpResponse.writeHeaders"

Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>
2026-03-11 21:18:08 +01:00
Alex Hultman
8982605b01 Update docs 2026-03-11 20:45:58 +01:00
Copilot
0305f8f21a Fix fatal V8 crash when passing undefined as App options (#1232)
* Initial plan

* Fix issue #1102: add missing check in readOptionsObject to throw exception instead of fatal error

Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>
2026-03-11 20:43:10 +01:00
Copilot
78508e3af4 docs: document UWS_HTTP_MAX_HEADERS_SIZE and UWS_HTTP_MAX_HEADERS_COUNT (#1230)
* Initial plan

* docs: document UWS_HTTP_MAX_HEADERS_SIZE and UWS_HTTP_MAX_HEADERS_COUNT in README

Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>
2026-03-11 20:31:35 +01:00
Copilot
af7015b40e Fix maxLifetime: 240 causing immediate WebSocket disconnection (#1231)
* Initial plan

* Fix maxLifetime: 240 causing immediate WebSocket disconnection

Cap maxLifetime at 239 in AppWrapper.h to prevent uSockets modulo
wraparound bug (240 % 240 == current timestamp => instant timeout).
Also clamp to non-negative values. Update TypeScript docs to document
valid range as 0 | 1-239.

Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>
2026-03-11 20:30:48 +01:00
Igor Lins e Silva
087ebf8a98 types: add AppDescriptor type and methods for worker threads (#1131)
Added:
- AppDescriptor interface as a native type (similar to us_listen_socket)
- Methods on TemplatedApp:
  - getDescriptor()
  - addChildAppDescriptor()
  - removeChildAppDescriptor()
2026-03-11 19:42:28 +01:00
Copilot
59a051059d [WIP] Update uWebSockets submodule to latest version (#1229)
* Initial plan

* Update uWebSockets submodule to c7b37fc (Expose remote port api)

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-03-11 19:41:30 +01:00
Copilot
9aeea4e715 Support symbol-keyed properties in WebSocket UserData (#1228)
* Initial plan

* Fix: Support symbol keys in UserData for WebSocket upgrade (issue #1184)

Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>

* Remove accidentally committed build artifacts and add .gitignore

Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>

* Delete .gitignore

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>
2026-03-11 19:40:42 +01:00
BV-WebDev
c51b086249 Fixe us_socket_local_port() missing argument type (#1222) 2026-03-11 19:37:03 +01:00
Shachar-Brightdata
bb831f0faf Add getRemotePort bindings (#1162) 2026-03-11 19:32:27 +01:00
Copilot
b03dd9d6d2 Add HttpResponse.writeHeaders (#1227)
* Initial plan

* Add HttpResponse.writeHeaders method

Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>
2026-03-11 18:41:05 +01:00
BV-WebDev
7d83524a90 Update onData() documentation (#1223) 2026-03-11 15:33:21 +01:00
Copilot
b0a1028301 HttpResponse: add onFullData with zero-copy fast path and lazy allocation (#1225)
* Initial plan

* Add onFullData to HttpResponseWrapper for accumulating POST body data

Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>

* onFullData: fast paths, zero-copy, lazy allocation

Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>
2026-03-11 15:03:58 +01:00
Alex Hultman
a11eb9df1e Update docs 2026-03-08 10:42:03 +01:00
Alex Hultman
a1bff123b3 Fix writeStatus docs 2026-03-08 10:26:13 +01:00
mike-git374
813e9e94e0 docs: add sendFragment (#1218) 2026-03-08 10:13:16 +01:00
Copilot
891cb0b0a0 Update licensing comment year to 2026 across all source files (#1216)
* Initial plan

* Update licensing comment year to 2026 in all source files

Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>
2026-03-07 14:34:18 +01:00