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;

Some of the restrictions are :

All alphabetical data must be converted to upper case before sending to the 

No NULL terminated strings should be sent to the host end. Instead, fill it 
blanks before sending. The strings received from the host end are padded 
blanks and are not NULL terminated.

3. All the structures should be defined in the following manner:

Items of type char or unsigned char, or arrays containing items of these
types, are byte aligned.

Structures are word aligned; structures of odd size are padded to an even
number of bytes.

All other types of structure members are word aligned.
All numeric data must be set to zero (0) before sending to the host, unless 
value is assigned to it.
5. All reserved fields mentioned,should be mapped to CHAR buffer and 
initialized to
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 ?

You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to