pub unsafe extern "C" fn esp_transport_read(
    t: esp_transport_handle_t,
    buffer: *mut c_char,
    len: c_int,
    timeout_ms: c_int
) -> c_int
Expand description

@brief Transport read function

@param t The transport handle @param buffer The buffer @param[in] len The length @param[in] timeout_ms The timeout milliseconds (-1 indicates wait forever)

@return

  • Number of bytes was read
  • 0 Read timed-out
  • (<0) For other errors

@note: Please refer to the enum esp_tcp_transport_err_t for all the possible return values