#include <cafe.h> #include <cafe/nssl/nsslclient.h> NSSL_RVAL NSSLGetPending(NSSLConnectionHandle connection, int* pPendingBytes);
|connection||A handle to a SSL connection to be queried.|
|pPendingBytes||A pointer to hold the count of bytes available to be read.|
NSSL_RVAL_OK upon success, error code of type NSSL_RVAL on failure.
Returns the number of bytes left in the current record that the application still needs to read before
NSSLRead reads additional data from the underlying socket.
NSSLGetPendingreturns zero, it does NOT indicate there is no data to read from the underlying socket. Use
SOSelectto detect socket readability.
NSSLRead must read an entire record from the underlying socket before it can decrypt it and return it to the application.
NSSLRead may return only a portion of a single record, but will never return portions of two different records.
NSSLGetPending returns more than zero,
NSSLRead will return at least a portion of the record and will not read additional data from the socket.
NSSLGetPending returns zero after a successful
NSSLRead, the application has finished reading the current record, and calling
NSSLRead may result in reading additional data from the underlying socket.
|Callbacks||Do not call this function from any callback function.|
|Interrupt handler||Do not call this function from any interrupt handler.|
|Exception handler||Do not call this function from any exception handler.|
2012/08/16 Cleanup pass.
2012/04/06 Initial version.