[gnutls-devel] gnutls_record_cork and maximum record size

Nikos Mavrogiannopoulos nmav at gnutls.org
Fri Dec 19 07:55:28 CET 2014


On Wed, 2014-12-17 at 16:04 +0200, Jaak Ristioja wrote:
> Hello!
> 
> The documentation for gnutls_record_cork() states:
> 
>   If called gnutls_record_send() will no longer send partial records.
> All queued records will be sent when gnutls_uncork() is called, or when
> the maximum record size is reached.
> 
> As I understand the documentation, it implies that if the session is
> corked by gnutls_record_cork() and the size of the data queued by
> successive calls to gnutls_record_send() reaches the maximum record
> size, then gnutls_record_get_max_size() bytes of data are passed to the
> underlying transport. However, the source code for gnutls_record_send()
> implies that if the session is corked then data is queued until
> gnutls_record_uncork() is called (or GNUTLS_E_MEMORY_ERROR is returned).
> Do I misunderstand the documentation or is there a discrepancy between
> the source code and the documentation?

No you don't misunderstand the documentation, it is wrong. I'll update
it to match the current behavior of the code.

regards,
Nikos





More information about the Gnutls-devel mailing list