[gnutls-help] vectored gnutls_record_send for DTLS?

Nikos Mavrogiannopoulos nmav at gnutls.org
Fri Mar 28 10:37:28 CET 2014


On Fri, Mar 28, 2014 at 8:42 AM, Steven Brown <swbrown at variadic.org> wrote:
> Is there any way of doing vectored I/O for writes with gnutls?  There
> seems to be a gnutls_transport_set_vec_push_function but no
> corresponding gnutls_record_send_vec or similar.  This is an issue for
> DTLS where I can't just do multiple writes as they'll end up in separate
> packets and the alternative of rewriting each packet in memory is expensive.

Hello,
 There is no vectored read and write yet, but you can simulate it use
gnutls_record_cork() and uncork().

However, as these were made for TLS, there is some care needed when
using them under DTLS (e.g., ensure you don't queue more data than the
value of gnutls_dtls_get_data_mtu()).

regards,
Nikos



More information about the Gnutls-help mailing list