Function esp_idf_svc::sys::esp_transport_get_errno

source ·
pub unsafe extern "C" fn esp_transport_get_errno(
    t: *mut esp_transport_item_t,
) -> i32
Expand description

@brief Get and clear last captured socket errno

Socket errno is internally stored whenever any of public facing API for reading, writing, polling or connection fails returning negative return code. The error code corresponds to the SO_ERROR value retrieved from the underlying transport socket using getsockopt() API. After reading the captured errno, the internal value is cleared to 0.

@param[in] t The transport handle

@return

  • =0 Last captured socket errno

  • -1 Invalid transport handle or invalid transport’s internal error storage