Update passthrough state
This commit is contained in:
parent
65d68f33dc
commit
72301104ff
|
@ -107,11 +107,13 @@ function Client(/*input, output*/) {
|
||||||
});
|
});
|
||||||
|
|
||||||
this.setTemporaryDirectDataHandler = function(handler) {
|
this.setTemporaryDirectDataHandler = function(handler) {
|
||||||
|
this.dataPassthrough = true; // let implementations do with what they will here
|
||||||
this.input.removeAllListeners('data');
|
this.input.removeAllListeners('data');
|
||||||
this.input.on('data', handler);
|
this.input.on('data', handler);
|
||||||
};
|
};
|
||||||
|
|
||||||
this.restoreDataHandler = function() {
|
this.restoreDataHandler = function() {
|
||||||
|
this.dataPassthrough = false;
|
||||||
this.input.removeAllListeners('data');
|
this.input.removeAllListeners('data');
|
||||||
this.input.on('data', this.dataHandler);
|
this.input.on('data', this.dataHandler);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue