コード例 #1
0
 /**
  * @param ConnectionInterface $connection
  *
  * @return mixed
  */
 public function onClose(ConnectionInterface $connection)
 {
     /** @var TimerInterface $timer */
     foreach ($connection->PeriodicTimer as $tid => $timer) {
         $connection->PeriodicTimer->cancelPeriodicTimer($tid);
     }
     return $this->decorated->onClose($connection);
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 public function onClose(ConnectionInterface $conn)
 {
     if ($this->connections->contains($conn)) {
         $decor = $this->connections[$conn];
         $this->connections->detach($conn);
         $this->component->onClose($decor);
     }
 }
コード例 #3
0
ファイル: IoServer.php プロジェクト: hugohenrique/Ratchet
 /**
  * A connection has been closed by React
  * @param \React\Socket\ConnectionInterface $conn
  */
 public function handleEnd($conn)
 {
     try {
         $this->app->onClose($conn->decor);
     } catch (\Exception $e) {
         $this->handleError($e, $conn);
     }
     unset($conn->decor);
 }
コード例 #4
0
ファイル: OriginCheck.php プロジェクト: DannyHuisman/Ratchet
 /**
  * {@inheritdoc}
  */
 function onClose(ConnectionInterface $conn)
 {
     return $this->_component->onClose($conn);
 }
コード例 #5
0
ファイル: SessionProvider.php プロジェクト: perfect-coin/chat
 /**
  * {@inheritdoc}
  */
 function onClose(ConnectionInterface $conn)
 {
     // "close" session for Connection
     return $this->_app->onClose($conn);
 }
コード例 #6
0
 /**
  * This is called before or after a socket is closed (depends on how it's closed).  SendMessage to $conn will not result in an error if it has already been closed.
  * @param  ConnectionInterface $conn The socket/connection that is closing/closed
  * @throws \Exception
  */
 public function onClose(ConnectionInterface $conn)
 {
     $wrapped = $this->connections->offsetGet($conn);
     $this->wrapped->onClose($wrapped);
     $this->connections->detach($conn);
 }
コード例 #7
0
ファイル: FOSUserProvider.php プロジェクト: HeliosDX/BlogWim1
 /**
  * {@inheritdoc}
  */
 public function onClose(ConnectionInterface $conn)
 {
     return $this->_app->onClose($conn);
 }
コード例 #8
0
ファイル: IpBlackList.php プロジェクト: igez/gaiaehr
 /**
  * {@inheritdoc}
  */
 function onClose(ConnectionInterface $conn)
 {
     if (!$this->isBlocked($conn->remoteAddress)) {
         $this->_decorating->onClose($conn);
     }
 }