저자: Vasily Zorin (maintainer@daemon.io)
상속: extends Connection
예제 #1
0
 /**
  * Called when session finishes
  * @return void
  */
 public function onFinish()
 {
     parent::onFinish();
     $this->event('disconnect');
     if (isset($this->xml)) {
         $this->xml->finish();
     }
     unset($this->roster);
     if ($this->keepaliveTimer) {
         Timer::remove($this->keepaliveTimer);
     }
 }
예제 #2
0
 /**
  * Called when connection finishes
  */
 public function onFinish()
 {
     if ($this->eofTerminated) {
         $this->requestFinished();
         $this->onResponse->executeAll($this, false);
         parent::onFinish();
         return;
     }
     if ($this->protocolError) {
         $this->onResponse->executeAll($this, false);
     } else {
         if ($this->state !== self::STATE_ROOT && !$this->onResponse->isEmpty()) {
             $this->requestFinished();
         }
     }
     parent::onFinish();
 }
예제 #3
0
파일: Connection.php 프로젝트: zenus/phpinx
 /**
  * @TODO
  * @return void
  */
 public function onFinish()
 {
     parent::onFinish();
     $this->trigger('disconnected');
 }
예제 #4
0
 /**
  * Called when connection finishes
  * @return void
  */
 public function onFinish()
 {
     $this->onResponse->executeAll(false);
     parent::onFinish();
 }
예제 #5
0
 /**
  * Called when the connection is handshaked (at low-level), and peer is ready to recv. data
  * @return void
  */
 public function onReady()
 {
     if (static::$requestCommandListFlipped === null) {
         static::$requestCommandListFlipped = array_flip(static::$requestCommandList);
     }
     if (static::$responseCommandListFlipped === null) {
         static::$responseCommandListFlipped = array_flip(static::$responseCommandList);
     }
     parent::onReady();
 }
예제 #6
0
 /**
  * Called when connection finishes
  * @return void
  */
 public function onFinish()
 {
     parent::onFinish();
     if ($this->subscribed) {
         unset($this->pool->servConnSub[$this->url]);
     }
     /* we should reassign subscriptions */
     foreach ($this->subscribeCb as $sub => $cbs) {
         foreach ($cbs as $cb) {
             call_user_func([$this->pool, 'subscribe'], $sub, $cb);
         }
     }
     foreach ($this->psubscribeCb as $sub => $cbs) {
         foreach ($cbs as $cb) {
             call_user_func([$this->pool, 'psubscribe'], $sub, $cb);
         }
     }
 }
예제 #7
0
파일: Connection.php 프로젝트: zenus/phpinx
 /**
  * Called when connection finishes
  * @return void
  */
 public function onFinish()
 {
     if ($this->pool->identd) {
         $this->pool->identd->unregisterPair($this->locPort, $this->port);
     }
     $this->event('disconnect');
     parent::onFinish();
 }
예제 #8
0
 /**
  * Called when the connection is handshaked (at low-level), and peer is ready to recv. data
  * @return void
  */
 public function onReady()
 {
     parent::onReady();
     $this->setWatermark(null, $this->pool->maxAllowedPacket);
 }
예제 #9
0
 /**
  * onFinish
  * @return void
  */
 public function onFinish()
 {
     foreach ($this->cursors as $curId => $cur) {
         if ($cur instanceof Cursor) {
             $cur->destroy(true);
         }
     }
     $this->cursors = null;
     $this->requests = null;
     parent::onFinish();
 }
예제 #10
0
 /**
  * Called when session finishes
  * @return void
  */
 public function onFinish()
 {
     $this->state = self::CONN_STATE_START;
     parent::onFinish();
     $this->event('disconnect');
 }
예제 #11
0
 /**
  * Called when connection finishes
  * @return void
  */
 public function onFinish()
 {
     $this->command(Pool::COM_QUIT);
     parent::onFinish();
 }