[Spread-users] byte-order/endiness for payload

brian reinbolt brian at eastshore.com
Mon May 11 20:15:30 EDT 2009


Json is a fairly simple way to accomplish this:

http://www.json.org/


On May 11, 2009, at 5:07 PM, Alec H. Peterson wrote:

> Hi Joseph,
>
> On May 11, 2009, at 17:02, Joseph VanAndel wrote:
>
>> What techniques do spread users use to handle byte-order and  
>> alignment
>> issues for messages sent via spread?
>>
>> For example, if I'm sending a set of parameters
>>
>> struct example {
>>     int param1;
>>     int param2;
>>     float f1;
>>     float f2;
>> };
>> from one computer to another computer with different byte order  
>> and/or
>> alignment, I can't simply send the byte representation of the
>> structure.
>>
>> For integers, I could use the htohl() calls, but there is no standard
>> implementation (that I know of) for network byte order for floats or
>> doubles.  I could also use Sun's xdr or send the parameters using  
>> XML.
>>
>> Any other suggestions?
>
>
> If you aren't worried about wasting a bit of space you can just put
> them in as string buffers.
>
> Alec
>
> --
> Alec H. Peterson - alec.peterson at messagesystems.com
> +1 443 656 3322
> Director of Technical Services
> Message Systems, Inc.
>
>
>
>
> _______________________________________________
> Spread-users mailing list
> Spread-users at lists.spread.org
> http://lists.spread.org/mailman/listinfo/spread-users



** *** ***** *******
brian reinbolt
1322 acton street
berkeley, Ca
*********** *************






More information about the Spread-users mailing list