Esempio n. 1
0
        public void UdpClientSendAndRecieve()
        {
            Byte[] data = new byte[] { 0x20, 0x21, 0x22 };

            Thread thread = new Thread(threadFunc);

            thread.Start();

            udpCom1.setPeer("127.0.0.1", 2201);
            udpCom1.send(data);

            System.Threading.Thread.Sleep(1000); //Wait 1 seconds.

            Assert.AreEqual(data[0], recievedData[0]);
        }