Author: Vasily Zorin (maintainer@daemon.io)
Inheritance: extends IOStream
Example #1
0
 /**
  * @TODO DESCR
  */
 public function onFinish()
 {
     if ($this->attachedServer) {
         $this->attachedServer->attachedClients->detach($this);
     }
     Timer::remove($this->keepaliveTimer);
     parent::onFinish();
 }
Example #2
0
 /**
  * @TODO
  * @param  string $s Data
  */
 public function write($s)
 {
     parent::write($s);
 }
Example #3
0
 /**
  * Called when connection finishes
  * @return void
  */
 public function onFinish()
 {
     $this->onResponse->executeAll($this, false);
     $this->onResponse = null;
     if ($this->pool && $this->url !== null) {
         $this->pool->detachConnFromUrl($this, $this->url);
     }
     parent::onFinish();
 }
Example #4
0
 /**
  * @TODO DESCR
  */
 public function onReady()
 {
     $this->sendPacket(['op' => 'start', 'pid' => Daemon::$process->getPid(), 'workerId' => Daemon::$process->getId()]);
     parent::onReady();
 }