+
+ /**
+ * Pipe
+ * e.g. $ticker->pipe(STDIN, new IO\Process("gzip"), new IO\Process("base64"), STDOUT);
+ * @param IO ...
+ * @return \atick\Ticker
+ */
+ function pipe(/*IO ...*/) {
+ $io = func_get_args();
+ reset($io);
+
+ do {
+ $r = current($io);
+ $w = next($io);
+
+ $this->read($r, $w ?: function($fd) {
+ stream_copy_to_stream($fd, STDOUT);
+ });
+ } while ($w);
+
+ return $this;
+ }