Merge branch 'bugfix/asio_example_config' into 'master'

[EXAMPLES/ASIO] Renames Kconfig parameter and clarify

See merge request espressif/esp-idf!17769
This commit is contained in:
David Čermák
2022-04-26 13:24:17 +08:00
2 changed files with 5 additions and 5 deletions

View File

@@ -6,11 +6,11 @@ menu "Example Configuration"
help help
Address of the proxy to be used. Address of the proxy to be used.
config EXAMPLE_PROXY_PORT config EXAMPLE_PROXY_SERVICE
string "Proxy port" string "Proxy Service Type"
default "myport" default "myport"
help help
Port for the proxy. Due to a limitation of lwip, must Service type. Due to a limitation of lwip, must
be a number e.g. "1080". be the port number e.g. "1080".
endmenu endmenu

View File

@@ -378,7 +378,7 @@ extern "C" void app_main(void)
asio::io_context io_context; asio::io_context io_context;
Http::Request request(Http::Method::GET, "www.httpbin.org", "80", "/get"); Http::Request request(Http::Method::GET, "www.httpbin.org", "80", "/get");
Socks::async_connect(io_context, CONFIG_EXAMPLE_PROXY_ADDRESS, CONFIG_EXAMPLE_PROXY_PORT, request.host(), request.service_port(), Socks::async_connect(io_context, CONFIG_EXAMPLE_PROXY_ADDRESS, CONFIG_EXAMPLE_PROXY_SERVICE, request.host(), request.service_port(),
[&request](std::shared_ptr<Connection> connection) { [&request](std::shared_ptr<Connection> connection) {
// Now we create a HTTP::Session and inject the necessary connection. // Now we create a HTTP::Session and inject the necessary connection.
std::make_shared<Http::Session>(connection)->send_request(request, [](std::shared_ptr<Http::Session> session, Http::Response response) { std::make_shared<Http::Session>(connection)->send_request(request, [](std::shared_ptr<Http::Session> session, Http::Response response) {