Implement file transfer invalid chunk detection

This commit is contained in:
2021-12-16 16:47:19 +10:00
parent 5b6fd24af4
commit a14b9b0e15
2 changed files with 25 additions and 11 deletions
+5 -6
View File
@@ -18,7 +18,7 @@ namespace MIT_Master_Server
class Program
{
static Server server;
static FileInfo file = new FileInfo(@"D:\iPad_10.2_15.1_19B74_Restore.ipsw");
static FileInfo file = new FileInfo(@"D:\Bookmark.zip");
static int maxConcurrentTransfers = 5;
static void Main(string[] args)
@@ -73,7 +73,11 @@ namespace MIT_Master_Server
Chunk = buffer,
ChunkSize = bytesRead
});
//Console.WriteLine($"Sent: {bytesRead}");
packetsSent += 1;
//Console.WriteLine(packetsSent);
}
}
@@ -88,11 +92,6 @@ namespace MIT_Master_Server
{
//Console.WriteLine($"Client Connected from: {(e.TcpClient.Client.RemoteEndPoint as IPEndPoint).Address}");
await server.SendPacket(e.TcpClient, new TestPacket()
{
TestOne = 50,
TestTwo = true
});
}
}
}