diff --git a/README.md b/README.md index c7434a5bc..1bf3f39ac 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ For production bots, using node-opus should be considered a necessity, especiall - One of the following packages can be installed for faster voice packet encryption and decryption: - [sodium](https://www.npmjs.com/package/sodium) (`npm install sodium --save`) - [libsodium.js](https://www.npmjs.com/package/libsodium-wrappers) (`npm install libsodium-wrappers --save`) +- [uws](https://www.npmjs.com/package/uws) for a much faster WebSocket connection (`npm install uws --save`) ## Example usage ```js diff --git a/docs/general/welcome.md b/docs/general/welcome.md index 04a401394..f06b4e0c5 100644 --- a/docs/general/welcome.md +++ b/docs/general/welcome.md @@ -48,6 +48,7 @@ For production bots, using node-opus should be considered a necessity, especiall - One of the following packages can be installed for faster voice packet encryption and decryption: - [sodium](https://www.npmjs.com/package/sodium) (`npm install sodium --save`) - [libsodium.js](https://www.npmjs.com/package/libsodium-wrappers) (`npm install libsodium-wrappers --save`) +- [uws](https://www.npmjs.com/package/uws) for a much faster WebSocket connection (`npm install uws --save`) ## Example usage ```js diff --git a/package.json b/package.json index a5d3f7be6..e0d48d083 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,8 @@ "node-opus": "^0.2.5", "opusscript": "^0.0.3", "sodium": "^2.0.1", - "libsodium-wrappers": "^0.5.1" + "libsodium-wrappers": "^0.5.1", + "uws": "^0.14.1" }, "devDependencies": { "@types/node": "^7.0.0", diff --git a/src/client/websocket/WebSocketConnection.js b/src/client/websocket/WebSocketConnection.js index bcd6f57ca..4ed353fe8 100644 --- a/src/client/websocket/WebSocketConnection.js +++ b/src/client/websocket/WebSocketConnection.js @@ -2,7 +2,6 @@ const browser = require('os').platform() === 'browser'; const EventEmitter = require('events'); const Constants = require('../../util/Constants'); const zlib = require('zlib'); -const util = require('util'); const PacketManager = require('./packets/WebSocketPacketManager'); const erlpack = (function findErlpack() { try {