[ccan] New module: iobuffer

Joseph Adams joeyadams3.14159 at gmail.com
Fri Jun 17 15:56:00 EST 2011


Here's a new module that provides two callback-driven interfaces,
struct ibuffer and struct obuffer, for input and output.  The
interfaces themselves are simple, and should lend themselves to fast
input and output, but implementing custom input and output drivers is
a little tricky.

My main motivation for writing this module was to have "string buffer"
functionality, similar to std::stringstream in C++ and StringBuilder
in Java.  Instead of just writing a string buffer library, I decided
to generalize and make it a "buffered output" library, with string
building as one possible output target.  While I was at it, I threw in
ibuffer.

This module is tested and ready to go in.  If anyone has any comments,
particularly about the overall design, please post them. Thanks!


Joey Adams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-iobuffer-New-module-for-fast-hookable-binary-I-O-str.patch
Type: text/x-patch
Size: 52960 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/ccan/attachments/20110617/98b81099/attachment-0001.bin>


More information about the ccan mailing list