pub unsafe extern "C" fn esp_tls_conn_new_async(
    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 non-blocking TLS/SSL connection

This function initiates a non-blocking TLS/SSL connection with the specified host, but due to its non-blocking nature, it doesn’t wait for the connection to get established.

@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. non_block member of this structure should be set to be true. @param[in] tls pointer to esp-tls as esp-tls handle.

@return - -1 If connection establishment fails. - 0 If connection establishment is in progress. - 1 If connection establishment is successful.