Florian Dold <[email protected]> writes: > We already have something exactly like that: > > https://git.gnunet.org/gnunet.git/tree/src/include/gnunet_buffer_lib.h
Oh... didn't notice it. Sorry. > Maybe it makes more sense to add new functionality to the buffer lib? > I.e., teach the buffer lib to read from / write to files, in a similar > fashion to the Java NIO that you've mentioned. We can also add some > other ways to read/parse data, such as the ones Christian suggested. Right now the buffer library only alows to write strings and reading is actually getting the contents of the whole buffer and parsing it manually. A way to get specific data types or simply read in chunks would be better, but in that case it would probably be a good idea to create a "serialized" data type like in my "FIO" suggestion, even just to avoid implementing multiple times the same things in different places. A.V.
