On Tue, Jun 28, 2011 at 7:59 PM, Michael Cronenworth <[email protected]> wrote:
> 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.
The description of the function mentions "in the gnutls buffers". I believe this
clarifies the discrepancy you see in the example below. select()
checks the kernel
buffers.
regards,
Nikos
> 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 );
> }
>
_______________________________________________
Help-gnutls mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-gnutls