/**
  * @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
 /**
  * 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
 /**
  * {@inheritdoc}
  */
 function onClose(ConnectionInterface $conn)
 {
     return $this->_component->onClose($conn);
 }
Пример #5
0
 /**
  * {@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
 /**
  * {@inheritdoc}
  */
 public function onClose(ConnectionInterface $conn)
 {
     return $this->_app->onClose($conn);
 }
Пример #8
0
 /**
  * {@inheritdoc}
  */
 function onClose(ConnectionInterface $conn)
 {
     if (!$this->isBlocked($conn->remoteAddress)) {
         $this->_decorating->onClose($conn);
     }
 }