From d51e45f3b926533e9f59834ffab8ae196947155c Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Wed, 1 Feb 2017 02:01:36 -0500 Subject: [PATCH] Add bufferutil info, and uws warning --- README.md | 5 ++++- docs/general/welcome.md | 5 ++++- package.json | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e2378afab..4ae6a28ff 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,11 @@ Using opusscript is only recommended for development environments where node-opu For production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers. ### Optional packages -- [uws](https://www.npmjs.com/package/uws) for a much faster WebSocket connection (`npm install uws --save`) +- [bufferutil](https://www.npmjs.com/package/bufferutil) to greatly speed up the `ws` WebSocket connection (`npm install bufferutil --save`) - [erlpack](https://github.com/hammerandchisel/erlpack) for significantly faster WebSocket data (de)serialisation (`npm install hammerandchisel/erlpack --save`) +- [uws](https://www.npmjs.com/package/uws) for a much faster WebSocket connection (`npm install uws --save`) + **Note:** This package does not handle disconnects entirely correctly, which causes automatic reconnection to Discord to not function. + If you use this package, it may be wise to destroy + recreate the client entirely or restart the process upon disconnect. ## Example Usage ```js diff --git a/docs/general/welcome.md b/docs/general/welcome.md index d78672a6c..52e84a814 100644 --- a/docs/general/welcome.md +++ b/docs/general/welcome.md @@ -43,8 +43,11 @@ Using opusscript is only recommended for development environments where node-opu For production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers. ### Optional packages -- [uws](https://www.npmjs.com/package/uws) for a much faster WebSocket connection (`npm install uws --save`) +- [bufferutil](https://www.npmjs.com/package/bufferutil) to greatly speed up the `ws` WebSocket connection (`npm install bufferutil --save`) - [erlpack](https://github.com/hammerandchisel/erlpack) for significantly faster WebSocket data (de)serialisation (`npm install hammerandchisel/erlpack --save`) +- [uws](https://www.npmjs.com/package/uws) for a much faster WebSocket connection (`npm install uws --save`) + **Note:** This package does not handle disconnects entirely correctly, which causes automatic reconnection to Discord to not function. + If you use this package, it may be wise to destroy + recreate the client entirely or restart the process upon disconnect. ## Example Usage ```js diff --git a/package.json b/package.json index b19ef003b..0af8f452d 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "ws": "^2.0.0" }, "peerDependencies": { + "bufferutil": "^1.3.0", "erlpack": "hammerandchisel/erlpack", "node-opus": "^0.2.0", "opusscript": "^0.0.2",