/** * 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); } }
/** * 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(); } }