[gnutls-devel] gnutls_record_cork and maximum record size

Jaak Ristioja jaak.ristioja at cyber.ee
Wed Dec 17 15:04:35 CET 2014


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?


Regards,
Jaak Ristioja
Cybernetica AS



More information about the Gnutls-devel mailing list