/** * Takes the appropriate action to close the connection down */ private function sendFatalErrorResponse(MWebsocketUser $user) { // Just close the socket if in handhake mode if (!$user->handshakeDone()) { MWebsocket::getInstance($this->_controller)->disconnect($user->socket()); return; } else { //send a status code and then close } }