Compare commits
3 Commits
extract_parser
...
0.5.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 7fc369fc82 | |||
| ec4ba0eb74 | |||
| d9475f5b07 |
@@ -4,3 +4,4 @@
|
||||
.redcar
|
||||
.travis.yml
|
||||
node_modules
|
||||
spec
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
### 0.5.0 / 2013-05-05
|
||||
|
||||
* Extract the protocol handlers into the `websocket-driver` library
|
||||
* Support the Node streaming API
|
||||
|
||||
|
||||
### 0.4.4 / 2013-02-14
|
||||
|
||||
* Emit the `close` event if TCP is closed before CLOSE frame is acked
|
||||
|
||||
@@ -133,7 +133,9 @@ socket objects expose the selected protocol through the `ws.protocol` property.
|
||||
|
||||
## WebSocket API
|
||||
|
||||
Both server- and client-side `WebSocket` objects support the following API:
|
||||
Both server- and client-side `WebSocket` objects support the following API.
|
||||
They are both readable and writable streams, so for example you can write an
|
||||
echo server using `socket.pipe(socket)`.
|
||||
|
||||
* <b>`on('open', function(event) {})`</b> fires when the socket connection is
|
||||
established. Event has no attributes.
|
||||
|
||||
@@ -28,14 +28,8 @@ socket.onclose = function() {
|
||||
|
||||
} else {
|
||||
socket = new WebSocket.Client(host + '/runCase?case=' + n + '&agent=' + encodeURIComponent(agent));
|
||||
|
||||
socket.onmessage = function(event) {
|
||||
socket.send(event.data);
|
||||
};
|
||||
|
||||
socket.onclose = function() {
|
||||
runCase(n + 1);
|
||||
};
|
||||
socket.pipe(socket);
|
||||
socket.on('close', function() { runCase(n + 1) });
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ var requestHandler = function(request, response) {
|
||||
}, 1000);
|
||||
}, 2000);
|
||||
|
||||
fs.createReadStream(__dirname + '/haproxy.conf').pipe(es);
|
||||
fs.createReadStream(__dirname + '/haproxy.conf').pipe(es, {end: false});
|
||||
|
||||
es.onclose = function() {
|
||||
clearInterval(loop);
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
, "author" : "James Coglan <jcoglan@gmail.com> (http://jcoglan.com/)"
|
||||
, "keywords" : ["websocket", "eventsource"]
|
||||
|
||||
, "version" : "0.4.4"
|
||||
, "version" : "0.5.0"
|
||||
, "engines" : {"node": ">=0.4.0"}
|
||||
, "main" : "./lib/faye/websocket"
|
||||
, "dependencies" : {"websocket-driver": ""}
|
||||
|
||||
Reference in New Issue
Block a user