[gnutls-devel] Question about gnutls_record_uncork
Nikos Mavrogiannopoulos
nmav at gnutls.org
Mon Dec 9 13:46:28 CET 2013
On Mon, Dec 9, 2013 at 1:27 PM, Jaak Ristioja <jaak.ristioja at cyber.ee> wrote:
> Hi!
> Looking at the source code of the gnutls_record_uncork function in
> lib/gnutls_record.c it appears that the following might happen:
> ...
> ret = gnutls_record_send(...); /* ret >= 0 */
> ...
> total += ret;
> ...
> ret = gnutls_record_send(...); /* ret < 0 */
> ...
> return ret;
> Hence, whatever was stored in the variable "total", is lost even in case
> of EAGAIN when flags != GNUTLS_RECORD_WAIT. The problem here is that the
> code calling gnutls_record_uncork has no way to tell how much data was
> actually sent.
[...]
> Are there any other means to check how much pending output data TLS has
> buffered? Can somebody please comment on this? Thanks!
You cannot get this information. It is kept internally and will be
used to send the rest of the data when you call gnutls_record_uncork()
again. Could you explain about your use-case and why you think you
need that?
regards,
Nikos
More information about the Gnutls-devel
mailing list