/// <summary>
 /// Recieves TCP Message
 /// </summary>
 private static void WaitForMessage()
 {
     while (true)
     {
         TCP.Receive();
     }
 }
 /// <summary>
 /// Calls checks each n seconds.
 /// </summary>
 private void MainLoopTimerOnTick(object sender, EventArgs eventArgs)
 {
     //TCP Connection
     if (TCP.Connected)
     {
         TCP.Send("Ping");
     }
     if (TCP.Client != null)
     {
         TCP.Connected = TCP.Client.Connected;
     }
     if (!TCP.Connected)
     {
         TCP.Open();
     }
 }
Exemple #3
0
 public static void AskKart()
 {
     //IsRecievingKarts = true;
     KartList.KList.Clear();
     TCP.Send("K");
 }
Exemple #4
0
 public static void Update()
 {
     Users.Clear();
     TCP.Send("R");
 }
Exemple #5
0
 private void Application_Exit(object sender, ExitEventArgs e)
 {
     TCP.Close();
 }