コード例 #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);
        }