On Tue, 20 Aug 2013 04:26:41 -0700 (PDT)
utkarsh deep <utkarshdon1...@gmail.com> wrote:

> I want to send the structure over a network and my computer is Little 
> Endian and Host Computer is Big Endian . 
> Suppose I want to send 
> 
> 
> 
> struct Contract_DESC CD;
>      char CounterPartyBrokerId[5];
>      char Reserved4;              // byte
>      char Reserved5;
>      char Reserved10;                                // byte
>      char CloseoutFlag;
>      char Reserved6;              // byte
>      short OrderType;
>      double OrderNumber;
>      char AccountNumber[10];
>      short BookType;
>      short Buy_SellIndicator;
>      long DisclosedVolume;
>      long DisclosedVolumeRemaining;
>    }
> 
[snip]
> can some one write the code with sockets involved 
> I am new to this Protocol Buffer . Can u write the code for this
> structure please ?
> 

Hello,
That’s not how Protobuf works. Protobuf doesn’t let you pack data into
an arbitrary format, like you have listed above. Protobuf uses its own
format; you only specify what data you want to encode, not how.
Protobuf will not help you implement the protocol you described.

Chris

Attachment: signature.asc
Description: PGP signature

Reply via email to