EncodeInventoryPayload() public static method

public static EncodeInventoryPayload ( InventoryPayload invPayload ) : byte[]
invPayload InventoryPayload
return byte[]
コード例 #1
0
ファイル: RemoteSender.cs プロジェクト: yonglehou/BitSharp
        public async Task SendGetData(ImmutableArray <InventoryVector> invVectors)
        {
            await Task.Yield();

            var getDataPayload = Messaging.ConstructInventoryPayload(invVectors);
            var getDataMessage = Messaging.ConstructMessage("getdata", NetworkEncoder.EncodeInventoryPayload(getDataPayload));

            await SendMessageAsync(getDataMessage);
        }
コード例 #2
0
ファイル: RemoteSender.cs プロジェクト: yonglehou/BitSharp
        public async Task SendInventory(ImmutableArray <InventoryVector> invVectors)
        {
            await Task.Yield();

            var invPayload = Messaging.ConstructInventoryPayload(invVectors);
            var invMessage = Messaging.ConstructMessage("inv", NetworkEncoder.EncodeInventoryPayload(invPayload));

            await SendMessageAsync(invMessage);
        }