Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function getSubProtocols()
 {
     if ($this->_app instanceof WsServerInterface) {
         return $this->_app->getSubProtocols();
     } else {
         return array();
     }
 }
Пример #2
0
 /**
  * @param string
  * @return boolean
  */
 public function isSubProtocolSupported($name)
 {
     if (!$this->isSpGenerated) {
         if ($this->_decorating instanceof WsServerInterface) {
             $this->acceptedSubProtocols = array_flip($this->_decorating->getSubProtocols());
         }
         $this->isSpGenerated = true;
     }
     return array_key_exists($name, $this->acceptedSubProtocols);
 }
Пример #3
0
 public function handleError(\Exception $e, $conn)
 {
     $this->app->onError($conn->decor, $e);
 }
Пример #4
0
 /**
  * {@inheritdoc}
  */
 function onError(ConnectionInterface $conn, \Exception $e)
 {
     if (!$this->isBlocked($conn->remoteAddress)) {
         $this->_decorating->onError($conn, $e);
     }
 }