Author: Vasily Zorin (maintainer@daemon.io)
Inheritance: use trait PHPDaemon\Traits\ClassWatchdog, use trait PHPDaemon\Traits\StaticObjectWatchdog, use trait PHPDaemon\Traits\EventHandlers, use trait PHPDaemon\Traits\EventLoopContainer
Beispiel #1
0
 /**
  * Close the process
  * @return void
  */
 public function close()
 {
     parent::close();
     $this->closeWrite();
     if (is_resource($this->pd)) {
         proc_close($this->pd);
     }
 }
Beispiel #2
0
 /**
  * Called when connection finishes
  * @return void
  */
 public function onFinish()
 {
     if (!$this->connected) {
         if ($this->onConnected) {
             $this->onConnected->executeAll($this);
             $this->onConnected = null;
         }
     }
     parent::onFinish();
 }