Пример #1
0
        private static async void Client_OnPacketReceived1(object data)
        {
            MyPacket packet = (MyPacket)data;

            Console.WriteLine("Got: " + packet.Data);
            await client.SendData(new MyPacket
            {
                Data = $"{packet.Data}"
            });
        }
Пример #2
0
        private static void Client_OnPacketReceived(object data)
        {
            MyPacket packet = (MyPacket)data;

            Console.WriteLine("Got: " + packet.Data);
        }