This is called before or after a socket is closed
public handleDisconnect ( Kraken\Network\NetworkConnectionInterface $conn ) | ||
$conn | Kraken\Network\NetworkConnectionInterface | The socket/connection that is closing/closed |
/** * @override * @inheritDoc */ public function handleDisconnect(NetworkConnectionInterface $conn) { if ($this->connCollection->contains($conn)) { $decor = $this->connCollection[$conn]; $this->connCollection->detach($conn); $this->wsServer->handleDisconnect($decor); } }
/** * Handler triggered when an existing connection is being closed. * * @param SocketInterface $socket */ public function handleDisconnect($socket) { try { $this->component->handleDisconnect($socket->conn); } catch (Error $ex) { $this->handleError($socket, $ex); } catch (Exception $ex) { $this->handleError($socket, $ex); } unset($socket->conn); }
/** * @override * @inheritDoc */ public function handleDisconnect(NetworkConnectionInterface $conn) { return $this->component->handleDisconnect($conn); }
/** * @override * @inheritDoc */ public function handleDisconnect(NetworkConnectionInterface $conn) { if (!$this->isAddressBlocked($conn->getHost())) { $this->component->handleDisconnect($conn); } }
/** * @override * @inheritDoc */ public function handleDisconnect(NetworkConnectionInterface $conn) { if ($conn->httpHeadersReceived) { $this->httpServer->handleDisconnect($conn); } }