Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update readme

  • Loading branch information...
commit 450547e9d52275f859cd8c090f558d296f5206c0 1 parent 2de3663
@michaelcurtis authored
Showing with 7 additions and 3 deletions.
  1. +6 −2 README.md
  2. +1 −1  examples/basic.js
View
8 README.md
@@ -1,6 +1,6 @@
# node-ws-client
-A Web Socket client for node.js. This is a convenience wrapper around Peter Griess's node-websocket-client that transparently handles encoding/decoding of websocket data packets as well as heartbeat requests from a websocket server. Specifically, it makes it very easy to talk with a socket.io server.
+A Web Socket client for node.js. This is a convenience wrapper around Peter Griess's [node-websocket-client](https://github.com/pgriess/node-websocket-client) that transparently handles encoding/decoding of websocket data packets as well as heartbeat requests from a websocket server. Specifically, it makes it very easy to talk with a [socket.io](https://github.com/learnboost/socket.io-node) server.
## Installation
@@ -29,7 +29,11 @@ Put `lib/ws.js` in your `$NODE_PATH`.
console.log('Got message: '+message);
ws.close();
});
-
+
+To connect with a socket.io server use this connect string:
+
+ var ws = new wsc('ws://<socket.io server host>:<port>/socket.io/websocket');
+
## License
(The MIT License)
View
2  examples/basic.js
@@ -1,7 +1,7 @@
var sys = require('sys'),
wsc = require('../lib/ws').ws;
-var ws = new wsc('ws://localhost:8001/socket.io/websocket');
+var ws = new wsc('ws://localhost:8000/socket.io/websocket');
ws.on('open', function(sessionId) {
console.log('Websocket open with session id: '+sessionId);

1 comment on commit 450547e

@matzipan

Any updates on this project? It no longer functions on with socket.io.

Please sign in to comment.
Something went wrong with that request. Please try again.