Boost logo

Boost :

Subject: Re: [boost] Any interest in bitstream class?
From: Paul Long (plong_at_[hidden])
Date: 2013-06-28 20:44:36


On 6/28/2013 6:19 PM, Klaim - Joël Lamotte wrote:
> On Sat, Jun 29, 2013 at 1:16 AM, Klaim - Joël Lamotte <mjklaim_at_[hidden]>wrote:
>> Currently I'm using Raknet to communicate between the different processes,
>> it provide a specific stream type but it's not very general.
> To be clear: curently there is only one module of one of my applications
> that uses RakNet and should depend on it,
> but the other modules should be independant. Still they need to provide
> some data.
> So I'm using a std::string as raw data "streams" and move data into the
> module which will then push the data into Raknet facilities.
>
> It would be better if I was using a bitstream (or something similar) in
> this specific case, instead of std::string (in parts of the application
> which should not use Raknet).
(Hah! I've used std::string to hold raw binary data, too.)

Oh, so you need to be interoperable with whatever that Raknet component
does on the wire? If it does not serialize, the components of a
different endianness have to convert to their native endianness. Yuck.
If unserialized data is common "in the wild," perhaps the proposed
bitstream library should support various endianness in the bit stream. I
could either implement this initially or defer it until the need is
recognized.

Paul


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk