
14 Apr
2011
14 Apr
'11
6:03 a.m.
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