diff --git a/index.d.ts b/index.d.ts index ee096efd..62d66180 100644 --- a/index.d.ts +++ b/index.d.ts @@ -124,6 +124,13 @@ export interface HttpResponse { * buffer, not in a hash table. You can read about this in * the user manual under "corking". */ + + /** Pause http body streaming (throttle) */ + pause() : void; + + /** Resume http body streaming (unthrottle) */ + resume() : void; + writeStatus(status: RecognizedString) : HttpResponse; /** Writes key and value to HTTP response. * See writeStatus and corking. @@ -217,6 +224,10 @@ export interface HttpRequest { export interface WebSocketBehavior { /** Maximum length of received message. If a client tries to send you a message larger than this, the connection is immediately closed. Defaults to 16 * 1024. */ maxPayloadLength?: number; + /** Whether or not we should automatically close the socket when a message is dropped due to backpressure. Defaults to false. */ + closeOnBackpressureLimit?: number; + /** Maximum number of minutes a WebSocket may be connected before being closed by the server. 0 disables the feature. */ + maxLifetime?: number; /** Maximum amount of seconds that may pass without sending or getting a message. Connection is closed if this timeout passes. Resolution (granularity) for timeouts are typically 4 seconds, rounded to closest. * Disable by using 0. Defaults to 120. */ diff --git a/source_commit b/source_commit index 5a30b181..a6939431 100644 --- a/source_commit +++ b/source_commit @@ -1 +1 @@ -55a78899eb18022df0aadbc844062ab8353c79ee +ba3ba73ad2c0091c57f6b85d84a52486ef83005f diff --git a/uws_darwin_arm64_108.node b/uws_darwin_arm64_108.node index 233b4185..6cbc60d8 100644 Binary files a/uws_darwin_arm64_108.node and b/uws_darwin_arm64_108.node differ diff --git a/uws_darwin_arm64_111.node b/uws_darwin_arm64_111.node index 5178a232..31437de6 100644 Binary files a/uws_darwin_arm64_111.node and b/uws_darwin_arm64_111.node differ diff --git a/uws_darwin_arm64_93.node b/uws_darwin_arm64_93.node index 9f87a16a..5d157c57 100644 Binary files a/uws_darwin_arm64_93.node and b/uws_darwin_arm64_93.node differ diff --git a/uws_darwin_x64_108.node b/uws_darwin_x64_108.node index 73f32f79..768c3b16 100644 Binary files a/uws_darwin_x64_108.node and b/uws_darwin_x64_108.node differ diff --git a/uws_darwin_x64_111.node b/uws_darwin_x64_111.node index 9db87b20..0a35cd1a 100644 Binary files a/uws_darwin_x64_111.node and b/uws_darwin_x64_111.node differ diff --git a/uws_darwin_x64_93.node b/uws_darwin_x64_93.node index 63e44fe4..2259e277 100644 Binary files a/uws_darwin_x64_93.node and b/uws_darwin_x64_93.node differ