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::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 using oatpp::network::client::SimpleTCPConnectionProvider
void close Implements oatpp::network::ConnectionProvider::close(). Here does nothing.
std::shared_ptr<IOStream> getConnection Get connection.
oatpp::async::CoroutineStarterForResult<const std::shared_ptr<oatpp::data::stream::IOStream>&> getConnectionAsync Get connection in asynchronous manner.

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 using oatpp::network::client::SimpleTCPConnectionProvider as a provider of underlying transport stream.
    • @param config - oatpp::mbedtls::Config.
    • @param host - host.
    • @param port - port.
    • @return - std::shared_ptr to ConnectionProvider.
    static std::shared_ptr<ConnectionProvider> createShared(const std::shared_ptr<Config>& config, const oatpp::String& host, v_word16 port)
    

ConnectionProvider::close

Implements oatpp::network::ConnectionProvider::close(). Here does nothing.

void close() override

ConnectionProvider::getConnection

Get connection.

std::shared_ptr<IOStream> getConnection() override

ConnectionProvider::getConnectionAsync

Get connection in asynchronous manner.

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

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