mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
TLS: use isc_buffer_t for send requests
This commit replaces ad-hoc code for send requests buffer management within TLS with the one based on isc_buffer_t. 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 will get reused.
This commit is contained in:
@@ -735,7 +735,7 @@ typedef enum {
|
||||
|
||||
typedef struct isc_nmsocket_tls_send_req {
|
||||
isc_nmsocket_t *tlssock;
|
||||
isc_region_t data;
|
||||
isc_buffer_t data;
|
||||
isc_nm_cb_t cb;
|
||||
void *cbarg;
|
||||
isc_nmhandle_t *handle;
|
||||
|
Reference in New Issue
Block a user