From 9b6ef83824e43802cdc2f4e3b2edf1b3a4a8a9b8 Mon Sep 17 00:00:00 2001 From: doufu Date: Tue, 14 Feb 2023 12:34:16 +0800 Subject: [PATCH] Update the demo code of connection pool (#1) Update the demo code of connection pool related https://github.com/oatpp/oatpp/issues/712 --- docs/docs/components/api-client/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/components/api-client/README.md b/docs/docs/components/api-client/README.md index 4fb609132..ddd4f4aed 100644 --- a/docs/docs/components/api-client/README.md +++ b/docs/docs/components/api-client/README.md @@ -168,7 +168,7 @@ using namespace oatpp::web; auto connectionProvider = tcp::client::ConnectionProvider::createShared({"httpbin.org", 80, oatpp::network::Address::IP_4}); /* create connection pool */ -auto connectionPool = std::make_shared( +auto connectionPool = ClientConnectionPool::createShared( connectionProvider /* connection provider */, 10 /* max connections */, std::chrono::seconds(5) /* max lifetime of idle connection */ @@ -199,7 +199,7 @@ using namespace oatpp::web; auto connectionProvider = tcp::client::ConnectionProvider::createShared({"httpbin.org", 80, oatpp::network::Address::IP_4}); /* create connection pool */ -auto connectionPool = std::make_shared( +auto connectionPool = ClientConnectionPool::createShared( connectionProvider /* connection provider */, 10 /* max connections */, std::chrono::seconds(5) /* max lifetime of idle connection */