forked from espressif/esp-idf
feat(esp_http_client): Added ALPN feature in esp_http_client
Added the alpn field in esp_http_clinet_config_t struct. So that user can modify from the esp_http_clinet component.
This commit is contained in:
@@ -691,6 +691,11 @@ static bool init_common_tcp_transport(esp_http_client_handle_t client, const esp
|
||||
}
|
||||
esp_transport_tcp_set_interface_name(transport, client->if_name);
|
||||
}
|
||||
#if CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS
|
||||
if (config->alpn_protos) {
|
||||
esp_transport_ssl_set_alpn_protocol(transport, config->alpn_protos);
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -178,6 +178,10 @@ typedef struct {
|
||||
int keep_alive_interval; /*!< Keep-alive interval time. Default is 5 (second) */
|
||||
int keep_alive_count; /*!< Keep-alive packet retry send count. Default is 3 counts */
|
||||
struct ifreq *if_name; /*!< The name of interface for data to go through. Use the default interface without setting */
|
||||
#if CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS
|
||||
const char **alpn_protos; /*!< Application protocols required for HTTP2. If HTTP2/ALPN support is required, a list of protocols that should be negotiated. The format is length followed by protocol
|
||||
name. For the most common cases the following is ok: const char **alpn_protos = { "h2", NULL }; - where 'h2' is the protocol name */
|
||||
#endif
|
||||
#if CONFIG_ESP_TLS_USE_SECURE_ELEMENT
|
||||
bool use_secure_element; /*!< Enable this option to use secure element */
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user