pub struct rustls_accepted_alert { /* private fields */ }
Expand description
Represents a TLS alert resulting from accepting a client.
Implementations§
Source§impl rustls_accepted_alert
impl rustls_accepted_alert
Source#[no_mangle]pub extern "C" fn rustls_accepted_alert_write_tls(
accepted_alert: *mut rustls_accepted_alert,
callback: rustls_write_callback,
userdata: *mut c_void,
out_n: *mut size_t,
) -> rustls_io_result
#[no_mangle]pub extern "C" fn rustls_accepted_alert_write_tls(
accepted_alert: *mut rustls_accepted_alert,
callback: rustls_write_callback,
userdata: *mut c_void,
out_n: *mut size_t,
) -> rustls_io_result
Write some TLS bytes (an alert) to the network.
The actual network I/O is performed by callback
, which you provide.
Rustls will invoke your callback with a suitable buffer containing TLS
bytes to send. You don’t have to write them all, just as many as you can
in one syscall.
The userdata
parameter is passed through directly to callback
. Note that
this is distinct from the userdata
parameter set with
rustls_connection_set_userdata
.
Returns 0 for success, or an errno value on error. Passes through return values
from callback. See rustls_write_callback
or AcceptedAlert
for
more details.
Source#[no_mangle]pub extern "C" fn rustls_accepted_alert_free(
accepted_alert: *mut rustls_accepted_alert,
)
#[no_mangle]pub extern "C" fn rustls_accepted_alert_free(
accepted_alert: *mut rustls_accepted_alert,
)
Free a rustls_accepted_alert.
Parameters:
accepted_alert: The rustls_accepted_alert to free.
Calling with NULL is fine. Must not be called twice with the same value.