Home › Forums › Support › Send file with progress and stats › Reply To: Send file with progress and stats
August 12, 2013 at 15:31
#1033
Anonymous
Inactive
Hello. Starting from this:
System.IO.Stream recievedData = new System.IO.MemoryStream();
NetworkComms.AppendGlobalIncomingPacketHandler<byte[]>("PartitionedSend", (packetHeader, connection, incomingBytes) =>
{
Console.WriteLine("\n ... Incoming data from " + connection.ToString());
recievedData.Write(incomingBytes, 0, incomingBytes.Length);
});
How can I know when all packets have been received ? When the stream is completed I wold to know where to handle the receivedData variable get bytes from the stream.
THanks
Max