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 Create shared ConnectionProvider.
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.

  • @param config - oatpp::libressl::Config.
  • @param host - host name without schema and port. Ex.: "oatpp.io", "127.0.0.1", "localhost".
  • @param port - server port.

ConnectionProvider(const std::shared_ptr<Config>& config, const oatpp::String& host, v_word16 port)

ConnectionProvider::createShared

Create shared ConnectionProvider.

  • @param config - oatpp::libressl::Config.
  • @param host - host name without schema and port. Ex.: "oatpp.io", "127.0.0.1", "localhost".
  • @param port - server 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