Function bearssl::br_sslio_read [] [src]

pub unsafe extern "C" fn br_sslio_read(
    cc: *mut br_sslio_context,
    dst: *mut c_void,
    len: usize
) -> c_int

\brief Read some application data from a SSL connection.

If len is zero, then this function returns 0 immediately. In all other cases, it never returns 0.

This call returns only when at least one byte has been obtained. Returned value is the number of bytes read, or -1 on error. The number of bytes always fits on an 'int' (data from a single SSL/TLS record is returned).

On error or SSL closure, this function returns -1. The caller should inspect the error status on the SSL engine to distinguish between normal closure and error.

\param cc SSL wrapper context. \param dst destination buffer for application data. \param len maximum number of bytes to obtain. \return number of bytes obtained, or -1 on error.