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

            tcp.Disconnect();
            udp.Disconnect();
        }
Ejemplo n.º 4
0
        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);
        }