feat(tls): update esp-tls and tcp_transport from idf

Commit ID:88bf21b2
This commit is contained in:
yuanjm
2020-03-27 14:23:14 +08:00
parent ecdaca719e
commit fbed87bb5b
16 changed files with 810 additions and 191 deletions

View File

@@ -6,8 +6,12 @@
#include "esp_transport_utils.h"
void esp_transport_utils_ms_to_timeval(int timeout_ms, struct timeval *tv)
struct timeval* esp_transport_utils_ms_to_timeval(int timeout_ms, struct timeval *tv)
{
if (timeout_ms == -1) {
return NULL;
}
tv->tv_sec = timeout_ms / 1000;
tv->tv_usec = (timeout_ms - (tv->tv_sec * 1000)) * 1000;
return tv;
}