public static byte[] EncodeInventoryVector(InventoryVector invVector) { var stream = new MemoryStream(); EncodeInventoryVector(stream, invVector); return(stream.ToArray()); }
public static void EncodeInventoryVector(Stream stream, InventoryVector invVector) { using (var writer = new BinaryWriter(stream, Encoding.ASCII, leaveOpen: true)) { writer.Write4Bytes(invVector.Type); writer.Write32Bytes(invVector.Hash); } }
public static byte[] EncodeInventoryVector(InventoryVector invVector) { using (var stream = new MemoryStream()) using (var writer = new BinaryWriter(stream)) { EncodeInventoryVector(writer, invVector); return(stream.ToArray()); } }
public static void EncodeInventoryVector(BinaryWriter writer, InventoryVector invVector) { writer.WriteUInt32(invVector.Type); writer.WriteUInt256(invVector.Hash); }
public async Task SendGetData(InventoryVector invVector) { await SendGetData(ImmutableArray.Create(invVector)); }
public static byte[] EncodeInventoryVector(InventoryVector invVector) { var stream = new MemoryStream(); EncodeInventoryVector(stream, invVector); return stream.ToArray(); }