Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
Fragments.cs
1using System;
2using System.Collections.Generic;
3using System.IO;
4using System.Net;
5
7{
8 internal class Fragments
9 {
10 public SortedDictionary<int, byte[]> Parts = new SortedDictionary<int, byte[]>();
11 public IPEndPoint Source;
12 public long Timestamp;
13 public int? NrParts = null;
14 public bool Done = false;
15
16 internal byte[] ToByteArray()
17 {
18 using (MemoryStream ms = new MemoryStream())
19 {
20 foreach (byte[] Part in Parts.Values)
21 ms.Write(Part, 0, Part.Length);
22
23 return ms.ToArray();
24 }
25 }
26 }
27}