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

\brief Callback type: send data on the network.

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

\param ctx Context for the send callback (typically a file descriptor) \param buf Buffer holding the data to send \param len Length of the data to send

\return The callback must return the number of bytes sent if any, or a non-zero error code. If performing non-blocking I/O, \c MBEDTLS_ERR_SSL_WANT_WRITE must be returned when the operation would block.

\note The callback is allowed to send fewer bytes than requested. It must always return the number of bytes actually sent.

Aliased Type§

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

Variants§

§1.0.0

None

No value.

§1.0.0

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

Some value of type T.