return value of gnutls_record_check_pending

Michael Cronenworth mike at
Tue Jun 28 18:59:00 CEST 2011

Hi all,

My understanding of the man page for the function 
gnutls_record_check_pending() says that it should return the number of 
bytes waiting to be read, or 0 bytes if nothing is to be read.

I have run in to a case where the function is returning 0, but there 
really is data to be read (if I use gdb to jump past the gnutls call, 
data is read). Is there something I'm not understanding?

example pseudo-code:
while( 1 ) {
     ret = select( fd );
     // ret == 1
     ret = gnutls_record_check_pending( session );
     // ret == 0
     if ( ret == 0 )
     gnutls_record_recv( session );

-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20110628/e3ff430f/attachment.htm>

More information about the Gnutls-help mailing list