/// <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(); } }
public static void AskKart() { //IsRecievingKarts = true; KartList.KList.Clear(); TCP.Send("K"); }
public static void Update() { Users.Clear(); TCP.Send("R"); }
private void Application_Exit(object sender, ExitEventArgs e) { TCP.Close(); }