mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-21 17:11:05 +00:00
Update pipe-ipc.js
This commit is contained in:
parent
43649a5c16
commit
3294e23e59
|
@ -77,6 +77,16 @@ function PipeIPC() {
|
||||||
return text;
|
return text;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.readContinuously = function(callback) {
|
||||||
|
var isNext = true;
|
||||||
|
|
||||||
|
if (typeof callback === "function") {
|
||||||
|
while (isNext) {
|
||||||
|
isNext = callback(this, this.read());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
this.close = function() {
|
this.close = function() {
|
||||||
this.closeWriter();
|
this.closeWriter();
|
||||||
this.closeReader();
|
this.closeReader();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user