[Mono-list] Marshalling a big-endian byte collection into a struct in order to pull out values
Pat Kujawa
nlog.20.pckwk at spamgourmet.com
Tue Mar 30 11:49:39 EDT 2010
This question isn't specific to Mono, but I thought that there would be a lot
more expertise in the Mono crowd since endian issues crop up a lot more here
than in Windows! (Plus, there might be a Mono library for doing this work
that I don't know about.) Please see the question I posted at StackOverflow,
as it is easier to read and respond to:
http://stackoverflow.com/questions/2480116/marshalling-a-big-endian-byte-collection-into-a-struct-in-order-to-pull-out-value
Basically, I am receiving an array of bytes which represent a number of
different types (int32, int16, string, etc) in big-endian (network) byte
order and I would like an easy way to pull out the individual values. There
is a way to do this with bytes that match the endianness of the host machine
(which is always little-endian in my case), but I have yet to find a
big-endian method which is equally simple and elegant.
Thanks for your help,
Pat
--
View this message in context: http://n4.nabble.com/Marshalling-a-big-endian-byte-collection-into-a-struct-in-order-to-pull-out-values-tp1745399p1745399.html
Sent from the Mono - General mailing list archive at Nabble.com.
More information about the Mono-list
mailing list