Comparing version
{ | ||
"name": "primus", | ||
"version": "7.0.0", | ||
"version": "7.0.1", | ||
"description": "Primus is a simple abstraction around real-time frameworks. It allows you to easily switch between different frameworks without any code changes.", | ||
"main": "index.js", | ||
"typings": "primus.d.ts", | ||
"scripts": { | ||
@@ -67,3 +68,3 @@ "build": "mkdir -p dist && browserify primus.js -s Primus -p deumdify | derequire > dist/primus.js", | ||
"browserchannel": "~2.0.0", | ||
"browserify": "~14.1.0", | ||
"browserify": "~14.3.0", | ||
"chai": "~3.5.0", | ||
@@ -76,7 +77,7 @@ "condenseify": "~1.1.1", | ||
"emits": "~3.0.0", | ||
"engine.io": "~2.1.0", | ||
"engine.io-client": "~2.1.0", | ||
"engine.io": "~3.0.0", | ||
"engine.io-client": "~3.0.0", | ||
"faye-websocket": "~0.11.0", | ||
"inherits": "~2.0.3", | ||
"mocha": "~3.2.0", | ||
"mocha": "~3.3.0", | ||
"pre-commit": "~1.2.0", | ||
@@ -96,5 +97,5 @@ "primus-msgpack": "~1.0.2", | ||
"uws": "~0.14.0", | ||
"ws": "~2.2.0" | ||
"ws": "~2.3.0" | ||
}, | ||
"pre-commit": "test, integration" | ||
} |
@@ -21,12 +21,10 @@ 'use strict'; | ||
module.exports = function server() { | ||
const options = this.primus.options; | ||
const opts = Object.assign({ | ||
perMessageDeflate: this.primus.options.compression, | ||
maxPayload: this.primus.options.maxLength | ||
}, this.primus.options.transport); | ||
// | ||
// The `maxPayload` option is ignored by `uws` since version 0.10.0. | ||
// The value has been hardcoded to 16 MiB in version 0.10.9 so using | ||
// `options.transport.maxPayload` or `options.maxLength` as second | ||
// argument is useless here. | ||
// | ||
const group = native.server.group.create( | ||
options.compression || options.transport.perMessageDeflate ? 1 : 0 | ||
opts.perMessageDeflate ? 1 : 0, | ||
opts.maxPayload | ||
); | ||
@@ -82,3 +80,3 @@ | ||
if (soc.readable && soc.writable && secKey && secKey.length === 24) { | ||
soc.setNoDelay(options.transport.noDelay); | ||
soc.setNoDelay(opts.noDelay); | ||
@@ -85,0 +83,0 @@ let socketHandle = soc._handle; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
553387
0.02%14239
0.06%2221
-0.05%