* Fix file transfer bug for WebSockets and SSH. Set/restore temp data handler belongs in base client.

* Lint some files
This commit is contained in:
Bryan Ashby 2018-05-12 09:33:41 -06:00
parent b2ae81c59e
commit 388e581b90
4 changed files with 57 additions and 53 deletions

View file

@ -100,6 +100,16 @@ function Client(/*input, output*/) {
}
});
this.setTemporaryDirectDataHandler = function(handler) {
this.input.removeAllListeners('data');
this.input.on('data', handler);
};
this.restoreDataHandler = function() {
this.input.removeAllListeners('data');
this.input.on('data', this.dataHandler);
};
//
// Peek at incoming |data| and emit events for any special