Permalink
Browse files

emit drain event

  • Loading branch information...
1 parent f5f8357 commit 3a6618fc17ca570578fffdb3ce42f86b9b53dfcc @ericz ericz committed Jan 16, 2013
Showing with 4 additions and 1 deletion.
  1. +3 −0 lib/WebSocket.js
  2. +1 −1 package.json
View
3 lib/WebSocket.js
@@ -501,6 +501,9 @@ function establishConnection(ReceiverClass, SenderClass, socket, upgradeHead) {
}
var dataHandler = firstHandler;
socket.on('data', dataHandler);
+ socket.on('drain', function(){
+ self.emit('drain');
+ });
// if data was passed along with the http upgrade,
// this will schedule a push of that on to the receiver.
// this has to be done on next tick, since the caller
View
2 package.json
@@ -2,7 +2,7 @@
"author": "Eric Zhang",
"name": "streamws",
"description": "Lightly modified version of einaros/ws. TCP writes now return true/false to top",
- "version": "0.1.0",
+ "version": "0.1.1",
"repository": {
"type": "git",
"url": "git://github.com/binaryjs/streamws.git"

0 comments on commit 3a6618f

Please sign in to comment.