diff --git a/index.d.ts b/index.d.ts index cbb20145..fbb48e98 100644 --- a/index.d.ts +++ b/index.d.ts @@ -48,11 +48,12 @@ export type RecognizedString = string | ArrayBuffer | Uint8Array | Int8Array | U * Read more about this in the user manual. */ export interface WebSocket { - /** Sends a message. Returns 1 for success, 2 for dropped due to backpressure limit, and 0 for built up backpressure that will drain over time. You can check backpressure before or after sending by calling getBufferedAmount(). + /** Sends a message. Make sure to check getBufferedAmount() before sending. Returns true for success, false for built up backpressure that will drain when time is given. + * Returning false does not mean nothing was sent, it only means backpressure was built up. This you can check by calling getBufferedAmount() afterwards. * * Make sure you properly understand the concept of backpressure. Check the backpressure example file. */ - send(message: RecognizedString, isBinary?: boolean, compress?: boolean) : number; + send(message: RecognizedString, isBinary?: boolean, compress?: boolean) : boolean; /** Returns the bytes buffered in backpressure. This is similar to the bufferedAmount property in the browser counterpart. * Check backpressure example. @@ -69,8 +70,8 @@ export interface WebSocket { */ close() : void; - /** Sends a ping control message. Returns sendStatus similar to WebSocket.send (regarding backpressure). This helper function correlates to WebSocket::send(message, uWS::OpCode::PING, ...) in C++. */ - ping(message?: RecognizedString) : number; + /** Sends a ping control message. Returns true on success in similar ways as WebSocket.send does (regarding backpressure). This helper function correlates to WebSocket::send(message, uWS::OpCode::PING, ...) in C++. */ + ping(message?: RecognizedString) : boolean; /** Subscribe to a topic. */ subscribe(topic: RecognizedString) : boolean; @@ -150,7 +151,7 @@ export interface HttpResponse { /** Every HttpResponse MUST have an attached abort handler IF you do not respond * to it immediately inside of the callback. Returning from an Http request handler - * without attaching (by calling onAborted) an abort handler is ill-use and will terminate. + * without attaching (by calling onAborted) an abort handler is ill-use and will termiante. * When this event emits, the response has been aborted and may not be used. */ onAborted(handler: () => void) : HttpResponse; @@ -249,7 +250,6 @@ export interface WebSocketBehavior { export interface AppOptions { key_file_name?: RecognizedString; cert_file_name?: RecognizedString; - ca_file_name?: RecognizedString; passphrase?: RecognizedString; dh_params_file_name?: RecognizedString; /** This translates to SSL_MODE_RELEASE_BUFFERS */ diff --git a/source_commit b/source_commit index 06a0b0b9..8e665816 100644 --- a/source_commit +++ b/source_commit @@ -1 +1 @@ -c35f534663fa14b5a0a4ba9beb57a63b9ae1a5a9 +0c6615488d03426435b1c3f28a8186e574787411 diff --git a/uws_darwin_arm64_108.node b/uws_darwin_arm64_108.node index 679a0a53..3c50099e 100644 Binary files a/uws_darwin_arm64_108.node and b/uws_darwin_arm64_108.node differ diff --git a/uws_darwin_arm64_83.node b/uws_darwin_arm64_83.node index e402e8fc..dfc0a682 100644 Binary files a/uws_darwin_arm64_83.node and b/uws_darwin_arm64_83.node differ diff --git a/uws_darwin_arm64_93.node b/uws_darwin_arm64_93.node index fc93d1ea..74a44448 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 f83ed21e..8c7f1bcf 100644 Binary files a/uws_darwin_x64_108.node and b/uws_darwin_x64_108.node differ diff --git a/uws_darwin_x64_83.node b/uws_darwin_x64_83.node index 9828fccd..57ac5e0c 100644 Binary files a/uws_darwin_x64_83.node and b/uws_darwin_x64_83.node differ diff --git a/uws_darwin_x64_93.node b/uws_darwin_x64_93.node index a6c1739a..d8d37ec4 100644 Binary files a/uws_darwin_x64_93.node and b/uws_darwin_x64_93.node differ