Exemple #1
0
        void Listen()
        {
            Thread listenThread = new Thread(() =>
            {
                while (true)
                {
                    try
                    {
                        SocketData data = (SocketData)socket.Receive();
                        ProcessData(data);
                    }
                    catch
                    {
                    }
                }
            });

            listenThread.IsBackground = true;
            listenThread.Start();
        }