pub type mbedtls_ssl_recv_t = Option<unsafe extern "C" fn(ctx: *mut c_void, buf: *mut c_uchar, len: usize) -> c_int>;
Expand description

\brief Callback type: receive data from the network.

\note That callback may be either blocking or non-blocking.

\param ctx Context for the receive callback (typically a file descriptor) \param buf Buffer to write the received data to \param len Length of the receive buffer

\returns If data has been received, the positive number of bytes received. \returns \c 0 if the connection has been closed. \returns If performing non-blocking I/O, \c MBEDTLS_ERR_SSL_WANT_READ must be returned when the operation would block. \returns Another negative error code on other kinds of failures.

\note The callback may receive fewer bytes than the length of the buffer. It must always return the number of bytes actually received and written to the buffer.

Aliased Type§

enum mbedtls_ssl_recv_t {
    None,
    Some(unsafe extern "C" fn(_: *mut c_void, _: *mut u8, _: usize) -> i32),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(_: *mut c_void, _: *mut u8, _: usize) -> i32)

Some value of type T.