Beispiel #1
0
 private void Disconnect()
 {
     Console.WriteLine($"{tcp.socket.Client.RemoteEndPoint} has disconnected.");
     GameLogic.onPlayerLeft(id);
     tcp.Disconnect();
     udp.Disconnect();
 }
Beispiel #2
0
 private void Disconnect()
 {
     Console.WriteLine($"{tcp.socket.Client.RemoteEndPoint} has disconnected.");
     player = null;
     udp.Disconnect();
     tcp.Disconnect();
 }
Beispiel #3
0
        public void Disconnect()
        {
            Console.WriteLine($"{tcp.socket.Client.RemoteEndPoint} has disconnected");
            clientPlayer = null;

            tcp.Disconnect();
            udp.Disconnect();
        }
        public void Disconnect()
        {
            disconnectTime = DateTime.Now;

            tcp.Disconnect();
            udp.Disconnect();
            Thread.Sleep(30000);
            RemoveClient();
        }
        /// <summary>Disconnects the client and stops all network traffic.</summary>
        private void Disconnect()
        {
            Console.WriteLine($"{tcp.socket.Client.RemoteEndPoint} has disconnected.");

            ThreadManager.ExecuteOnMainThread(() =>
            {
                GameManager.Get.Players.Remove(id);
            });

            tcp.Disconnect();
            udp.Disconnect();

            PacketSender.PlayerDisconnected(id);
        }