Exemplo n.º 1
0
 public void Close()
 {
     ListeningToConnection = false;
     if (connection != null && connection.Connected)
     {
         connection.Close();
     }
     MiddleManAPI.CloseLobby();
 }
Exemplo n.º 2
0
 public void Close()
 {
     ListeningToConnection = false;
     if (connection != null && connection.Connected)
     {
         SendMessage("DISCONNECT|");
         connection.Close();
     }
     MiddleManAPI.LeaveLobby();
 }
        public static void AttemptReconnect()
        {
            int attempts = 0;

            while (!MiddleManAPI.Connect() && attempts++ < 10)
            {
                Close();
            }

            // raise can't connect to server
        }