Function esp_idf_sys::esp_tls_conn_new_sync
source ยท pub unsafe extern "C" fn esp_tls_conn_new_sync(
hostname: *const c_char,
hostlen: c_int,
port: c_int,
cfg: *const esp_tls_cfg_t,
tls: *mut esp_tls_t,
) -> c_int
Expand description
@brief Create a new blocking TLS/SSL connection
This function establishes a TLS/SSL connection with the specified host in blocking manner.
@param[in] hostname Hostname of the host. @param[in] hostlen Length of hostname. @param[in] port Port number of the host. @param[in] cfg TLS configuration as esp_tls_cfg_t. If you wish to open non-TLS connection, keep this NULL. For TLS connection, a pass pointer to esp_tls_cfg_t. At a minimum, this structure should be zero-initialized. @param[in] tls Pointer to esp-tls as esp-tls handle.
@return - -1 If connection establishment fails. - 1 If connection establishment is successful. - 0 If connection state is in progress.