From: Matthias Troyer (troyer_at_[hidden])
Date: 2003-06-19 09:31:21
I would be interested,
On Thursday, June 19, 2003, at 03:22 AM, Paul Vanlint wrote:
> A couple of years ago I wrote a library module which provides a
> efficient way of handling with disjointed buffers and treating them as
> single contiguous block for extracting data.
> It was primarily intended to reconstruct TCP packets.
> For instance one machine creates a buffer with any combination of
> integers and length prepended byte blocks and sends it across the
> The other machine may receive 5 packets and the likelihood is that the
> objects in the message stream will straddle packet boundaries.
> The inefficient way of handling this is to copy the 5 packets into one
> contiguous block. However, for large data streams this becomes
> Alternatively, a fixed size block can be preallocated and used to
> store the
> packets as they come in to build up the whole message. However, that
> places a limit on the size of data being imported.
> My class will hold a buffer structure which may be disjointed and then
> provides member functions allowing data to be written to and read from
> The library demonstrates reference counting, stl containers and
> of operator<< and const member functions among other things.
> I haven't looked at the code for a little while, so there may well be
> tidying up needed.
> I wrote it initially for the company I worked for, but the owner of
> the code
> is happy for me to include this code here.
> Is this the kind of thing that people would be interested in including
> the boost library?
> Paul Vanlint.
> Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk