private static Task SendPacketAsync(IPEndPoint target, byte[] packet) { var cl = new UdpClient(); return cl.SendAsync(packet, packet.Length, target).ContinueWith((Task t) => cl.Close()); }