add bin file download demo through esp8266 module

This commit is contained in:
mculover666
2021-03-19 17:51:24 +08:00
parent e609bb3e69
commit 04f980f0c3
12 changed files with 2879 additions and 4 deletions

View File

@@ -98,13 +98,13 @@ int recv(int socket, void *buffer, size_t length, int flags)
SOCKET_ID_SET_SANITY_CHECK(socket);
if (!(flags & MSG_WAITALL)) {
return tos_sal_module_recv(socket_get_fd(socket), buffer, length);
return tos_sal_module_recv_timeout(socket_get_fd(socket), buffer, length, 4000);
}
while (total_len < length) {
recv_len = tos_sal_module_recv(socket_get_fd(socket),
recv_len = tos_sal_module_recv_timeout(socket_get_fd(socket),
(uint8_t *)buffer + total_len,
remain_len);
remain_len, 4000);
if (recv_len <= 0) {
continue;