Beispiel #1
0
 public static void EncodeInventoryPayload(BinaryWriter writer, InventoryPayload invPayload)
 {
     writer.WriteList(invPayload.InventoryVectors, invVector => EncodeInventoryVector(writer, invVector));
 }
Beispiel #2
0
 public static byte[] EncodeInventoryPayload(InventoryPayload invPayload)
 {
     using (var stream = new MemoryStream())
     using (var writer = new BinaryWriter(stream))
     {
         EncodeInventoryPayload(writer, invPayload);
         return stream.ToArray();
     }
 }
Beispiel #3
0
 private void HandleGetData(InventoryPayload payload)
 {
     this.OnGetData?.Invoke(this, payload);
 }