1313#include " oatpp/web/server/AsyncHttpConnectionHandler.hpp"
1414#include " oatpp/web/server/HttpRouter.hpp"
1515
16- #include " oatpp/network/client/SimpleTCPConnectionProvider .hpp"
17- #include " oatpp/network/server/SimpleTCPConnectionProvider .hpp"
16+ #include " oatpp/network/tcp/ client/ConnectionProvider .hpp"
17+ #include " oatpp/network/tcp/ server/ConnectionProvider .hpp"
1818
1919#include " oatpp/parser/json/mapping/ObjectMapper.hpp"
2020
@@ -43,7 +43,7 @@ class AppComponent {
4343 * Try to make sure you are using libtls, libssl, and libcrypto from the same package
4444 */
4545
46- return oatpp::libressl::server::ConnectionProvider::createShared (config, 8443 );
46+ return oatpp::libressl::server::ConnectionProvider::createShared (config, { " localhost " , 8443 } );
4747 }());
4848
4949 /* *
@@ -56,7 +56,7 @@ class AppComponent {
5656 /* *
5757 * Create ConnectionHandler component which uses Router component to route requests
5858 */
59- OATPP_CREATE_COMPONENT (std::shared_ptr<oatpp::network::server:: ConnectionHandler>, serverConnectionHandler)([] {
59+ OATPP_CREATE_COMPONENT (std::shared_ptr<oatpp::network::ConnectionHandler>, serverConnectionHandler)([] {
6060 OATPP_COMPONENT (std::shared_ptr<oatpp::web::server::HttpRouter>, router); // get Router component
6161 /* Async ConnectionHandler for Async IO and Coroutine based endpoints */
6262 return oatpp::web::server::AsyncHttpConnectionHandler::createShared (router);
@@ -77,8 +77,7 @@ class AppComponent {
7777 auto config = oatpp::libressl::Config::createShared ();
7878 tls_config_insecure_noverifycert (config->getTLSConfig ());
7979 tls_config_insecure_noverifyname (config->getTLSConfig ());
80- return oatpp::libressl::client::ConnectionProvider::createShared (config, " httpbin.org" , 443 );
81- // return oatpp::network::client::SimpleTCPConnectionProvider::createShared("httpbin.org", 80);
80+ return oatpp::libressl::client::ConnectionProvider::createShared (config, {" httpbin.org" , 443 });
8281 }());
8382
8483 OATPP_CREATE_COMPONENT (std::shared_ptr<MyApiClient>, myApiClient)([] {
0 commit comments