$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-users] Byte stream with multiple internal buffers
From: Andrej van der Zee (andrejvanderzee_at_[hidden])
Date: 2011-04-14 02:03:03
Hi,
I am writing a network sniffer that receives a variable number of TCP packets with payload strings of variable length that i need to concatenate. Using std string concatination is too expensive because of extra copying and possible reallocation of the internal buffer when it runs out of capacity. Better would be a special byte stream that stores its data in multiple variable-length buffers with an interface that works as if the buffers are just one buffer, with operations similar to std string.
I was wondering if boost provides a supporting library for this.
Thanks,
Andrej