/** * {@inheritdoc} */ public function getSubProtocols() { if ($this->_app instanceof WsServerInterface) { return $this->_app->getSubProtocols(); } else { return array(); } }
/** * @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); }
public function handleError(\Exception $e, $conn) { $this->app->onError($conn->decor, $e); }
/** * {@inheritdoc} */ function onError(ConnectionInterface $conn, \Exception $e) { if (!$this->isBlocked($conn->remoteAddress)) { $this->_decorating->onError($conn, $e); } }