diff --git a/index.d.ts b/index.d.ts index 29da76ab..f71a0d92 100644 --- a/index.d.ts +++ b/index.d.ts @@ -199,6 +199,12 @@ export interface HttpResponse { * If the total body size exceeds maxSize bytes, handler is called with null instead. */ onFullData(maxSize: number, handler: (fullBody: ArrayBuffer | null) => void) : HttpResponse; + /** Combined handler for HTTP request body streaming and connection abort events. + * If chunk is null, the connection was aborted. If maxRemainingBodyLength is 0n, the last chunk has arrived. + * You can safely preallocate using maxRemainingBodyLength (it is very large for chunked transfer encoding). + * You MUST copy the data of chunk if maxRemainingBodyLength is not 0n. We Neuter ArrayBuffers on return, making them zero length. */ + onStream(handler: (chunk: ArrayBuffer | null, maxRemainingBodyLength: bigint) => void) : HttpResponse; + /** Returns the remote IP address in binary format (4 or 16 bytes). */ getRemoteAddress() : ArrayBuffer; diff --git a/source_commit b/source_commit index 7739068f..206e7bef 100644 --- a/source_commit +++ b/source_commit @@ -1 +1 @@ -23d0f7a32a89d6e76ff30e6e02cc66de472621b6 +5ff1c5497b7ea82db37def33dfb16e1fbece0d04 diff --git a/uws_linux_arm64_115.node b/uws_linux_arm64_115.node index 33299b74..0bd83dbe 100644 Binary files a/uws_linux_arm64_115.node and b/uws_linux_arm64_115.node differ diff --git a/uws_linux_arm64_127.node b/uws_linux_arm64_127.node index b3ab708c..716f866c 100644 Binary files a/uws_linux_arm64_127.node and b/uws_linux_arm64_127.node differ diff --git a/uws_linux_arm64_137.node b/uws_linux_arm64_137.node index 6bf4fb74..88233be5 100644 Binary files a/uws_linux_arm64_137.node and b/uws_linux_arm64_137.node differ diff --git a/uws_linux_arm64_141.node b/uws_linux_arm64_141.node index 73764092..e5e9ba75 100755 Binary files a/uws_linux_arm64_141.node and b/uws_linux_arm64_141.node differ