# ConnectionProvider.hpp

This File On Github
Ask A Question

API: latest
module: oatpp-libressl
#include "oatpp-libressl/client/ConnectionProvider.hpp"

# ConnectionProvider

Libressl client connection provider. Extends oatpp::base::Countable, oatpp::network::ClientConnectionProvider.

namespace oatpp { namespace libressl { namespace client { 
  class ConnectionProvider : public base::Countable, public oatpp::network::ClientConnectionProvider {}
}}}

# Methods

Return Type Name Summary
[none] ConnectionProvider Constructor.
std::shared_ptr<ConnectionProvider> createShared Multiple implementations:
  1. Create shared ConnectionProvider.
  2. Create shared ConnectionProvider.
void stop Implements oatpp::network::ConnectionProvider::close. Here does nothing.
std::shared_ptr<data::stream::IOStream> get Get connection.
oatpp::async::CoroutineStarterForResult<const std::shared_ptr<oatpp::data::stream::IOStream>&> getAsync Get connection in asynchronous manner.
void invalidate Will call invalidateConnection() for the underlying transport stream.

# ConnectionProvider::ConnectionProvider

Constructor.

ConnectionProvider(const std::shared_ptr<Config>& config, const std::shared_ptr<oatpp::network::ClientConnectionProvider>& streamProvider)

# ConnectionProvider::createShared

  1. Create shared ConnectionProvider.
    static std::shared_ptr<ConnectionProvider> createShared(const std::shared_ptr<Config>& config,
                                                            const std::shared_ptr<oatpp::network::ClientConnectionProvider>& streamProvider)
    
  2. Create shared 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.

std::shared_ptr<data::stream::IOStream> get() override

# ConnectionProvider::getAsync

Get connection in asynchronous manner.

  • @return - oatpp::async::CoroutineStarterForResult.

oatpp::async::CoroutineStarterForResult<const std::shared_ptr<oatpp::data::stream::IOStream>&> getAsync() override

# ConnectionProvider::invalidate

Will call invalidateConnection() for the underlying transport stream.

void invalidate(const std::shared_ptr<data::stream::IOStream>& connection) override