mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 12:10:59 +00:00
MQTT: Integrate esp-mqtt library into idf
added docs and tests for mqtt library, small fixes (removed warnings, option for custom outbox, websocket bug fixed for longer transports). refactored to use common tcp_transport component, support for CMake build system. Closes #2108
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#ifndef _HTTP_UTILS_H_
|
||||
#define _HTTP_UTILS_H_
|
||||
#include <sys/time.h>
|
||||
#include "transport_utils.h"
|
||||
/**
|
||||
* @brief Assign new_str to *str pointer, and realloc *str if it not NULL
|
||||
*
|
||||
@@ -78,18 +79,8 @@ char *http_utils_join_string(const char *first_str, int len_first, const char *s
|
||||
*/
|
||||
int http_utils_str_starts_with(const char *str, const char *start);
|
||||
|
||||
/**
|
||||
* @brief Convert milliseconds to timeval struct
|
||||
*
|
||||
* @param[in] timeout_ms The timeout milliseconds
|
||||
* @param[out] tv Timeval struct
|
||||
*/
|
||||
void http_utils_ms_to_timeval(int timeout_ms, struct timeval *tv);
|
||||
|
||||
#define HTTP_MEM_CHECK(TAG, a, action) if (!(a)) { \
|
||||
ESP_LOGE(TAG,"%s:%d (%s): %s", __FILE__, __LINE__, __FUNCTION__, "Memory exhausted"); \
|
||||
action; \
|
||||
}
|
||||
#define HTTP_MEM_CHECK(TAG, a, action) TRANSPORT_MEM_CHECK(TAG, a, action)
|
||||
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user