# ConnectionProvider.hpp
This File On Github
Ask A Question
API: latest
module: oatpp-mbedtls
#include "oatpp-mbedtls/client/ConnectionProvider.hpp"
# ConnectionProvider
MbedTLS client connection provider. Extends oatpp::base::Countable, oatpp::network::ClientConnectionProvider.
namespace oatpp { namespace mbedtls { namespace client {
class ConnectionProvider : public oatpp::network::ClientConnectionProvider {}
}}}
# Methods
Return Type | Name | Summary |
---|---|---|
[none] | ConnectionProvider | Constructor. |
std::shared_ptr<ConnectionProvider> | createShared | Multiple implementations:
|
void | stop | Implements oatpp::network::ConnectionProvider::close. Here does nothing. |
provider::ResourceHandle<data::stream::IOStream> | get | Get connection. |
oatpp::async::CoroutineStarterForResult<const provider::ResourceHandle<data::stream::IOStream>&> | getAsync | Get connection in asynchronous manner. |
# ConnectionProvider::ConnectionProvider
Constructor.
- @param config - oatpp::mbedtls::Config.
- @param streamProvider - provider of underlying transport stream. oatpp::network::ClientConnectionProvider.
ConnectionProvider(const std::shared_ptr<Config>& config, const std::shared_ptr<oatpp::network::ClientConnectionProvider>& streamProvider)
# ConnectionProvider::createShared
- Create shared ConnectionProvider.
- @param config - oatpp::mbedtls::Config.
- @param streamProvider - provider of underlying transport stream. oatpp::network::ClientConnectionProvider.
- @return -
std::shared_ptr
to ConnectionProvider.
static std::shared_ptr<ConnectionProvider> createShared(const std::shared_ptr<Config>& config, const std::shared_ptr<oatpp::network::ClientConnectionProvider>& streamProvider)
- Create shared ConnectionProvider.
- @param config - oatpp::mbedtls::Config.
- @param address - oatpp::network::Address.
- @param useExtendedConnections - set
true
to use ConnectionProvider::ExtendedConnection.false
to use oatpp::network::tcp::Connection. - @return -
std::shared_ptr
to ConnectionProvider.
static std::shared_ptr<ConnectionProvider> createShared(const std::shared_ptr<Config>& config, const network::Address& address)
# ConnectionProvider::stop
Implements oatpp::network::ConnectionProvider::close. Here does nothing.
void stop() override
# ConnectionProvider::get
Get connection.
- @return -
std::shared_ptr
to oatpp::data::stream::IOStream.
provider::ResourceHandle<data::stream::IOStream> get() override
# ConnectionProvider::getAsync
Get connection in asynchronous manner.
- @return - oatpp::async::CoroutineStarterForResult.
oatpp::async::CoroutineStarterForResult<const provider::ResourceHandle<data::stream::IOStream>&> getAsync() override