feat(http_client): Add support for using custom tcp_transport

This commit is contained in:
David Cermak
2023-11-19 18:32:00 +01:00
parent 7e22a13afe
commit 96069eef3b
3 changed files with 31 additions and 2 deletions

View File

@@ -24,6 +24,11 @@ ESP_EVENT_DECLARE_BASE(ESP_HTTP_CLIENT_EVENT);
typedef struct esp_http_client *esp_http_client_handle_t;
typedef struct esp_http_client_event *esp_http_client_event_handle_t;
#if CONFIG_ESP_HTTP_CLIENT_ENABLE_CUSTOM_TRANSPORT
// Forward declares transport handle item to keep the dependency private (even if ENABLE_CUSTOM_TRANSPORT=y)
struct esp_transport_item_t;
#endif
/**
* @brief HTTP Client events id
*/
@@ -181,6 +186,9 @@ typedef struct {
#if CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS
bool save_client_session;
#endif
#if CONFIG_ESP_HTTP_CLIENT_ENABLE_CUSTOM_TRANSPORT
struct esp_transport_item_t *transport;
#endif
} esp_http_client_config_t;
/**