gnunet-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Let BIO also handle already allocated buffers


From: Alessio Vanni
Subject: Re: Let BIO also handle already allocated buffers
Date: Sun, 19 Apr 2020 15:40:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Florian Dold <address@hidden> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]