Function s2n_tls_sys::s2n_connection_set_read_fd

source ·
pub unsafe extern "C" fn s2n_connection_set_read_fd(
    conn: *mut s2n_connection,
    readfd: c_int
) -> c_int
Expand description

Sets the file descriptor for the read channel of an s2n connection.

@warning If the read end of the pipe is closed unexpectedly, writing to the pipe will raise a SIGPIPE signal. s2n-tls does NOT handle SIGPIPE. A SIGPIPE signal will cause the process to terminate unless it is handled or ignored by the application. @note This file-descriptor should be active and connected @param conn A pointer to the s2n connection @param readfd The new read file descriptor @returns S2N_SUCCESS on success. S2N_FAILURE on failure