|
From: | Michael Cronenworth |
Subject: | return value of gnutls_record_check_pending |
Date: | Tue, 28 Jun 2011 11:59:00 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Lightning/1.0b3pre Thunderbird/3.1.10 |
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 ) continue; gnutls_record_recv( session ); } Thanks, Michael |
[Prev in Thread] | Current Thread | [Next in Thread] |