Is it an error if esp_http_client_write() returns 0?

axellin
Posts: 197
Joined: Mon Sep 17, 2018 9:09 am

Is it an error if esp_http_client_write() returns 0?

Postby axellin » Thu May 06, 2021 3:38 am

For blocking IO case (client->is_async == false):
int wret = esp_http_client_write(client, buf, len);

1. All the callers in esp-idf, seems checking "wret < 0" rather than "wret <= 0".
So what actions to do if wret is 0? Is this an error?

2. If "wret == 0" is not an error, then the caller does not know how much data was already partially written.
i.e. not possible to re-send the missing part (not yet written part).

Who is online

Users browsing this forum: No registered users and 313 guests