/**
  * Shuts down the connection
  */
 public function shutdown()
 {
     Services::getEvent()->fire($this, 'shutdown');
     // Shutdown server connection if existant
     if (!feof($this->socket)) {
         $this->protocol->shutdownConnection();
     }
 }