Function esp_idf_sys::esp_tls_plain_tcp_connect
source ยท pub unsafe extern "C" fn esp_tls_plain_tcp_connect(
host: *const c_char,
hostlen: c_int,
port: c_int,
cfg: *const esp_tls_cfg_t,
error_handle: esp_tls_error_handle_t,
sockfd: *mut c_int,
) -> esp_err_t
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