Skip to content

Commit cc43bad

Browse files
committed
Urgent correction in README to account for recent API changes
1 parent 5e1f05c commit cc43bad

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -99,18 +99,18 @@ It is recommended that you use Node.js version >=0.10.22 due to memory leaks pre
9999
## How to use
100100

101101
The following example launches SocketCluster as 7 distinct processes (in addition to the current master process):
102-
- 3 workers on ports 9100, 9101, 9102
103-
- 3 stores on ports 9001, 9002, 9003
102+
- 3 workers
103+
- 3 stores
104104
- 1 load balancer on port 8000 which distributes requests evenly between the 3 workers
105105

106106
```js
107107
var SocketCluster = require('socketcluster').SocketCluster;
108108

109109
var socketCluster = new SocketCluster({
110-
workers: [9100, 9101, 9102],
111-
stores: [9001, 9002, 9003],
112-
balancerCount: 1, // Optional
113110
port: 8000,
111+
balancers: 1,
112+
workers: 3,
113+
stores: 3,
114114
appName: 'myapp',
115115
workerController: 'worker.js',
116116
// balancerController: 'firewall.js', // Optional
@@ -280,9 +280,9 @@ provide your private key and certificate as a start option when you instantiate
280280

281281
```js
282282
var socketCluster = new SocketCluster({
283-
workers: [9100, 9101, 9102],
284-
stores: [9001, 9002, 9003],
285-
balancerCount: 1, // Optional
283+
balancers: 1,
284+
workers: 3,
285+
stores: 3,
286286
port: 8000,
287287
appName: 'myapp',
288288
workerController: 'worker.js',
@@ -380,8 +380,8 @@ Creates a new SocketCluster, must be invoked with the new keyword.
380380
var SocketCluster = require('socketcluster').SocketCluster;
381381

382382
var socketCluster = new SocketCluster({
383-
workers: [9100, 9101, 9102],
384-
stores: [9001, 9002, 9003],
383+
workers: 3,
384+
stores: 3,
385385
port: 8000,
386386
appName: 'myapp',
387387
workerController: 'worker.js'

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "socketcluster",
33
"description": "SocketCluster - A Highly parallelized WebSocket server cluster to make the most of multi-core machines/instances.",
4-
"version": "0.9.41",
4+
"version": "0.9.42",
55
"homepage": "https://github.com/topcloud/socketcluster",
66
"contributors": [
77
{

sample/server.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
var SocketCluster = require('socketcluster').SocketCluster;
22

33
var socketCluster = new SocketCluster({
4-
workers: [9100],
5-
stores: [9001],
6-
balancerCount: 1,
4+
balancers: 1,
5+
workers: 1,
6+
stores: 1,
77
port: 8000,
88
appName: 'myapp',
99
workerController: __dirname + '/worker.js',

0 commit comments

Comments
 (0)