TLS: use isc_buffer_t for send requests, reuse isc_buffer_t during send requests
This merge replaces ad-hoc code for send requests buffer management
within TLS with the one based on isc_buffer_t
.
To be precise, this merge request brings the idea of send requests object reuse further, by allowing the related dynamically allocated buffer to be reused as well.
Previous version of the code was trying to use pre-allocated small
buffers to avoid extra allocations. The code would allocate a larger
dynamic buffer when needed. There is no need to have ad-hoc code for
this, as isc_buffer_t
now provides this functionality internally.
Additionally to the above, the old version of the code lacked any
logic to reuse the dynamically allocated buffers. Now, as we do not
manage memory buffers, but isc_buffer_t
objects, we can implement this
strategy. It can be in particular helpful for longer lasting
connections, as in this case the buffer will adjust itself to the size
of the messages being transferred. That is, it is in particular useful
for XoT, as Stream DNS happen to order send requests in such a way
that the send request object will get reused.