Function esp_idf_svc::sys::esp_tls_conn_http_new_sync
source · pub unsafe extern "C" fn esp_tls_conn_http_new_sync(
url: *const i8,
cfg: *const esp_tls_cfg,
tls: *mut esp_tls,
) -> i32
Expand description
@brief Create a new blocking TLS/SSL connection with a given “HTTP” url
The behaviour is same as esp_tls_conn_new_sync() API. However this API accepts host’s url.
@param[in] url url of 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.