Function bearssl::br_sslio_write_all [] [src]

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

\brief Write application data unto a SSL connection.

This calls returns only when all requested len bytes have been written, or an error is reached. Returned value is 0 on success, -1 on error. A normal (verified) SSL closure before that many bytes are written is reported as an error by this function.

Important: SSL is buffered; a "written" byte is a byte that was injected into the wrapped SSL engine, but this does not necessarily mean that it has been scheduled for sending. Use br_sslio_flush() to ensure that all pending data has been sent to the transport medium.

\param cc SSL wrapper context. \param src source buffer for application data. \param len number of bytes to write. \return 0 on success, or -1 on error.