Function esp_idf_hal::sys::esp_transport_connect

source ยท
pub unsafe extern "C" fn esp_transport_connect(
    t: *mut esp_transport_item_t,
    host: *const i8,
    port: i32,
    timeout_ms: i32,
) -> i32
Expand description

@brief Transport connection function, to make a connection to server

@param t The transport handle @param[in] host Hostname @param[in] port Port @param[in] timeout_ms The timeout milliseconds (-1 indicates wait forever)

@return

  • 0 in case of successful connection
  • (-1) if there are any errors, should check errno