[openamq-dev] help on sending vector via middleware

Martin Sustrik sustrik at imatix.com
Fri Aug 17 12:02:43 CEST 2007


:)

Ok, first you have to decide how you wire-level binary format would look 
like. There are several decisions to be made:

1. Would the strings be zero-terminated or length-prefixed? If binary 
zero may occur in the middle of the string, legth-prefixing is the only 
option.

2. 'int' can have different number of bits depending on the system you 
are using. How many bits you want it to have on the wire?

3. Do you want integers in big- or little- endian representation on the 
wire?

4. How are negative integers going to be encoded on the wire?

5. What binary encoding of floating point numbers would you choose? 
(There is a RFC for that, you may want to check it out, however, I've 
forgot the number...)

Martin

Malinga wrote:
> HI Martin Sustrik i just check your program it works but im really sorry,
> 
> My data structure is
> struct MontageDataStructure{
>     int     SIDE;
>     std::string     EXCHANGE;
>     std::string     SYMBOLE;
>     int     SHARES;
>     double     STRIKE_PRICE;           
> };
> 
> Pls can you tell me how to encode this thing in the wire. Im so sorry i 
> know this is not relating to middleware. Pls help me on this.
> 
> Thanks in adavance.
> -Malinga
> 
> ------------------------------------------------------------------------
> Luggage? GPS? Comic books?
> Check out fitting gifts for grads 
> <http://us.rd.yahoo.com/evt=48249/*http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz> 
> at Yahoo! Search.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> openamq-dev mailing list
> openamq-dev at lists.openamq.org
> http://lists.openamq.org/mailman/listinfo/openamq-dev



More information about the openamq-dev mailing list