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