Beispiel #1
0
        private async Task Listener()
        {
            while (true)
            {
                try
                {
                    var client = await Socket.AcceptTcpClientAsync();

                    Task.Run(() => ClientHandler(client));
                }
                catch (Exception)
                {
                    Console.WriteLine("New client caused exception");
                }
            }
        }