Reputation: 101
I checked the BIO pending on Openssl man page.
Failed to get the difference between *_pening and *_wpending.
Could you share the difference.
Thanks.
int BIO_pending(BIO *b);
int BIO_wpending(BIO *b);
size_t BIO_ctrl_pending(BIO *b);
size_t BIO_ctrl_wpending(BIO *b);
Upvotes: 1
Views: 455
Reputation: 9392
BIO_pending
returns the amount of data waiting in the BIO's "read" buffer i.e. stuff that it has already read internally but has not yet been returned to the application via a BIO_read()
call (or similar).
BIO_wpending
returns the amount of data waiting in the BIO's "write" buffer, i.e. stuff that the application has asked the BIO to write via a call to BIO_write
(or similar), but the BIO hasn't actually written yet.
Upvotes: 2