Boost logo

Boost Users :

From: bringiton bringiton (kneeride_at_[hidden])
Date: 2006-07-19 03:28:38


I'm wondering whether boost has binary streams (or whether the
standard library does and i missed it).

I had a quick look at boost serialisation. looks like it maybe too
involved for my needs. my only needs would be something as follows:

outstream s;
s << (int)3;
s << (float)4.0;
s << std::string("hello");

void* data = s.buffer();
int size = s.size();

instream s(data, size);
int a << s;
float b << s;
std::string b << s;

I plan on sending the data over TCP. Portability would also be handy
(ie endian issues).

I may use asio when it is avail in the next boost release. does that
support binary streams?


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net