Function esp_idf_svc::sys::esp_tls_plain_tcp_connect

source ยท
pub unsafe extern "C" fn esp_tls_plain_tcp_connect(
    host: *const i8,
    hostlen: i32,
    port: i32,
    cfg: *const esp_tls_cfg,
    error_handle: *mut esp_tls_last_error,
    sockfd: *mut i32,
) -> i32
Expand description

@brief Creates a plain TCP connection, returning a valid socket fd on success or an error handle

@param[in] host Hostname of the host. @param[in] hostlen Length of hostname. @param[in] port Port number of the host. @param[in] cfg ESP-TLS configuration as esp_tls_cfg_t. @param[out] error_handle ESP-TLS error handle holding potential errors occurred during connection @param[out] sockfd Socket descriptor if successfully connected on TCP layer @return ESP_OK on success ESP_ERR_INVALID_ARG if invalid output parameters ESP-TLS based error codes on failure