public static void doDownloadFileCancel(DoDownloadFileCancel packet, ClientMosaique client) { if (!_canceledDownloads.ContainsKey(packet.id)) { _canceledDownloads.Add(packet.id, "canceled"); new DoDownloadFileResponse(packet.id, "canceled", new byte[0], -1, -1, "Canceled").Execute(client); } }
public static void HandleDoDownloadFileCancel(DoDownloadFileCancel command, Networking.Client client) { if (!_canceledDownloads.ContainsKey(command.Id)) { _canceledDownloads.Add(command.Id, "canceled"); client.SendBlocking(new DoDownloadFileResponse { Id = command.Id, Filename = "canceled", Block = new byte[0], MaxBlocks = -1, CurrentBlock = -1, CustomMessage = "Canceled" }); } }