/** * @return bool */ private function stopConnection() { if ($this->socket === null) { return false; } $socket = null; $ex = null; try { switch ($this->type) { case Channel::CONNECTOR: $this->destroyConnector(); break; case Channel::BINDER: $this->destroyBinder(); break; default: return false; } } catch (Error $ex) { } catch (Exception $ex) { } if ($ex !== null) { return false; } $this->socket->close(); unset($this->socket); $this->socket = null; return true; }
/** * @override * @inheritDoc */ public function stop() { $this->socket->close(); }
/** * @override * @inheritDoc */ public function close() { $this->listener->close(); }