Author: Vasily Zorin (maintainer@daemon.io)
Inheritance: extends PHPDaemon\Network\IOStream
示例#1
0
 /**
  * Called when new piece of request's body is received.
  * @param string $c Piece of request's body.
  * @return void
  */
 public function stdin($c)
 {
     if ($c === '') {
         $this->onWrite($this->proc);
     } else {
         $this->proc->write($c);
     }
 }
示例#2
0
 /**
  * Called when the request aborted.
  * @param \PHPDaemon\Core\ShellCommand $process
  * @return void
  */
 public function onWrite($process)
 {
     if ($this->attrs->stdin_done && $this->proc->writeState === false) {
         $this->proc->closeWrite();
     }
 }