Ejemplo n.º 1
0
        private void listenThread()
        {
            while (true)
            {
                Socket socket = tcpModel.listen();
                Player player = new Player(socket);

                players.Add(player);
                rtxtLog.Text += $"{player.getName()} join game.\n";
                player.sendData("user " + player.getID().ToString());

                Thread thread = new Thread(reciveDataThread);
                thread.Start(player);
            }
        }