Пример #1
0
        public void ExitMatch()
        {
            Assert.IsTrue(isInMatch);
            if (isInMatch)
            {
                if (match != tcp)
                {
                    match.Disconnect();
                }

                isInMatch = false;
            }
        }
Пример #2
0
 public static void Disconnect()
 {
     if (!isConnected)
     {
         return;
     }
     isConnected = false;
     tcp.Disconnect();
     tcp.Disconnect();
     Sender.Stop();
     ThreadManager.ExecuteOnMainThread(() => {
         InvokeOnServerDisconnected();
     });
 }
Пример #3
0
 /// <summary>Disconnect the client (tcp and udp).</summary>
 private void Disconnect()
 {
     Tcp.Disconnect();
     Udp.Disconnect();
     _server.GetClients().Remove(ID); //Remove the client frome the server client list.
     _server.GetNetworkServerAction().RemovePlayer(ID);
 }
Пример #4
0
        /// <inheritdoc/>
        public void Disconnect()
        {
            Tcp.Disconnect();
            Udp.Disconnect();

            OnClientDisconnected?.Invoke(this, new ClientEventArgs(this, Protocol.TCP & Protocol.UDP));
        }
Пример #5
0
        private void Disconnect()
        {
            Console.WriteLine($"{tcp.socket.Client.RemoteEndPoint} se ha desconectado.");

            jugador = null;
            tcp.Disconnect();
        }
Пример #6
0
 /// <summary>Disconnects the client and stops all network traffic.</summary>
 private void Disconnect()
 {
     Console.WriteLine($"{tcp.socket.Client.RemoteEndPoint} has disconnected.");
     LobbyRoomsManager.ExitRoom(id);
     clientUUID = "";
     tcp.Disconnect();
 }
Пример #7
0
 private void Disconnect()
 {
     Console.WriteLine($"{Tcp.Socket.Client.RemoteEndPoint} has disconnected.");
     Player = null;
     Tcp.Disconnect();
     Udp.Disconnect();
 }
Пример #8
0
    //Disconnessione Client
    public void Disconnect()
    {
        if (tcp.socket != null)
        {
            try{
                Debug.Log($"{tcp.socket.Client.RemoteEndPoint} has disconnected.");
            }
            catch {
            }
            try{
                ThreadManager.ExecuteOnMainThread(() => {
                    GameManager.instance.players.Remove(player.id);
                    DestroyPlayer();
                    player = null;
                });
            }
            catch {
            }
            try{
                tcp.Disconnect();
                udp.Disconnect();

                ServerSend.PlayerDisconnected(id);
            }
            catch (Exception _ex)
            {
                Debug.Log($"Disconnessione Improvvisa Errore:{_ex}");
            }
        }
    }
Пример #9
0
 private void Disconnect()
 {
     Console.WriteLine($"{username} has disconnected");
     Server.usernames.Remove(username);
     tcp.Disconnect();
     Server.clients[id] = new Client(id);
 }
Пример #10
0
    public void Disconnect()
    {
        if (isConnected)
        {
            GameManager.HandleClientDisconnect();

            isConnected = false;

            tcp.Disconnect();
            tcp = null;
            udp.Disconnect();
            udp = null;
            ServerManagerTCP.Disconnect();
            ServerManagerTCP = null;

            UnityEngine.Debug.Log("Disconnected from server.");

            OnConnectionChanged(new ClientConnectionEventArgs()
            {
                Success = !isConnected,
                Type    = ClientConnectionEvent.Disconnect
            });
            PlayerDisconnected?.Invoke(this, EventArgs.Empty);
        }
    }
Пример #11
0
        // Disconnect a single client from the server
        private void Disconnect()
        {
            Console.WriteLine($"{tcp.socket.Client.RemoteEndPoint} has disconnected.");

            tcp.Disconnect();
            udp.Disconnect();
        }
Пример #12
0
        private void _Disconnect()
        {
            Console.WriteLine($"{tcp.clientSocket.Client.RemoteEndPoint} has disconnected from router server.");
            tcp.Disconnect();

            RouterServer.Initialize(id);
        }
Пример #13
0
 private void Disconnect()
 {
     LeaveCurrentRoom();
     Console.WriteLine($"{tcp.socket.Client.RemoteEndPoint} has disconnected");
     player = null;
     tcp.Disconnect();
     udp.Disconnect();
 }
Пример #14
0
        private void Disconnect()
        {
            AccountHandler.SignOut(id);

            player = null;
            tcp.Disconnect();
            udp.Disconnect();
        }
Пример #15
0
        public void Dicsonnect()
        {
            Console.WriteLine($"{tcp.socket.Client.RemoteEndPoint} has disconnected.");

            player = null;

            tcp.Disconnect();
            udp.Disconnect();
        }
Пример #16
0
    /// <summary>Disconnects the client and stops all network traffic.</summary>
    private void Disconnect()
    {
        Debug.Log($"{tcp.socket.Client.RemoteEndPoint} has disconnected.");

        // TODO: destroy pirate

        tcp.Disconnect();
        udp.Disconnect();
    }
Пример #17
0
        public void Disconnect()
        {
            Log.info($"{tcp.socket.Client.RemoteEndPoint} has disconnected.");

            connectionManager.OnClientDisconnected(id);

            tcp.Disconnect();
            udp.Disconnect();
        }
Пример #18
0
    private void Disconnect()
    {
        Debug.Log($"{tcp.socket.Client.RemoteEndPoint} has disconnected.");
        UnityEngine.Object.Destroy(player.gameObject);
        player = null;

        tcp.Disconnect();
        udp.Disconnect();
    }
Пример #19
0
        private void Disconnect()
        {
            Console.WriteLine($"DEBUG: {tcp.socket.Client.RemoteEndPoint} has disconnected.");

            ServerService.clients.Remove(internalId);
            ServerService.clientIds.Remove(internalId);

            tcp.Disconnect();
            udp.Disconnect();
        }
Пример #20
0
        public void Disconnect()
        {
            tcp.Disconnect();
            udp.Disconnect();

            ThreadManager.ExecuteOnMainThread((GameLogic game) =>
            {
                game.Disconnect(id);
            });
        }
    public void Disconnect()
    {
        Debug.Log($"{tcp.socket.Client.RemoteEndPoint} se ha desconectado");

        UnityEngine.Object.Destroy(player.gameObject);
        player = null;

        tcp.Disconnect();
        udp.Disconnect();
    }
Пример #22
0
        private void Disconnect()
        {
            Debug.DLog($"{tcp.socket.Client.RemoteEndPoint} has disconnected.");
            //StreamWriter sw = new StreamWriter(ServerHandle.path, true);
            //sw.WriteLine($"{tcp.socket.Client.RemoteEndPoint} has disconnected at {DateTime.Now}");
            //sw.Close();

            tcp.Disconnect();
            udp.Disconnect();
        }
    private void Disconnect()
    {
        Debug.Log($"{tcp.socket.Client.RemoteEndPoint} has disconnected.");
        ServerStart.instance.DebugServer($"{tcp.socket.Client.RemoteEndPoint} has disconnected.");

        player = null;

        tcp.Disconnect();
        udp.Disconnect();
    }
Пример #24
0
 private void Disconnect()                                   //disconnect client and stop traffic inside the network
 {
     Debug.Log($"{tcp.socket.Client.RemoteEndPoint} with username {player.username} has disconnected from the game...");
     ThreadManager.ExecuteOnMainThread(() => {
         UnityEngine.Object.Destroy(player.gameObject);
         player = null;                                      //destroy Player object from main thread
     });
     tcp.Disconnect();
     udp.Disconnect();
     Send.DisconnectPlayer(client_id);                       //when client (local player's disconnects, inform all other connected players)
 }
Пример #25
0
        /// <summary>Disconnects the client and stops all network traffic.</summary>
        private void Disconnect()
        {
            Debug.Log($"{tcp.socket.Client.RemoteEndPoint} has disconnected.");

            ThreadManager.ExecuteOnMainThread(() => {
                UnityEngine.Object.Destroy(player.gameObject);
                player = null;
            });
            tcp.Disconnect();
            udp.Disconnect();
        }
Пример #26
0
        public void Disconnect()
        {
            if (isConnected)
            {
                isConnected = false;
                tcp?.Disconnect();
                udpSend?.Disconnect();

                Console.WriteLine("Disconnected from server.");
                Environment.Exit(-1);
            }
        }
Пример #27
0
 public void Disconnect()
 {
     if (tcp.socket != null)
     {
         ThreadManager.ExecuteOnMainThread(() => {
             NetworkManager.instance.ServerDestroyPlayer(this);
         });
     }
     tcp.Disconnect();
     udp.Disconnect();
     ServerSend.DespawnPlayer(id);
 }
Пример #28
0
    /// <summary>Disconnects the client and stops all network traffic.</summary>
    private void Disconnect()
    {
        Debug.Log($"{tcp.socket.Client.RemoteEndPoint} has disconnected.");

        ThreadManager.ExecuteOnMainThread(() =>
        {
            //player = null;
        });

        connected = false;
        tcp.Disconnect();
        udp.Disconnect();
    }
Пример #29
0
        public void Disconnect()
        {
            if (isConnected)
            {
                isConnected = false;
                udp.Disconnect();
                tcp.Disconnect();

                match.Disconnect();

                Debug.Log("Disconnected from server.");
            }
        }
Пример #30
0
    void Disconnect()
    {
        Console.WriteLine($"{tcp.socket.Client.RemoteEndPoint} has diconnected.");

        player = null;

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

        ServerSend.KickPlayer(id, "You were kicked");

        GameLogic.CheckGameState();
    }