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}" }); }
private static void Client_OnPacketReceived(object data) { MyPacket packet = (MyPacket)data; Console.WriteLine("Got: " + packet.Data); }