# AsyncHttpConnectionHandler.hpp

This File On Github
Ask A Question

API: latest
module: oatpp
#include "oatpp/web/server/AsyncHttpConnectionHandler.hpp"

# AsyncHttpConnectionHandler

Asynchronous oatpp::network::ConnectionHandler for handling http communication.

namespace oatpp { namespace web { namespace server { 
  class AsyncHttpConnectionHandler : public base::Countable, public network::ConnectionHandler, public HttpProcessor::TaskProcessingListener {}
}}}

# Methods

Return Type Name Summary
[none] AsyncHttpConnectionHandler Multiple implementations:
  1. Constructor.
  2. Constructor.
  3. Constructor.
  4. Constructor.
  5. Constructor.
  6. Constructor.
void addRequestInterceptor Add request interceptor. Request interceptors are called before routing happens.
void addResponseInterceptor Add response interceptor.
void stop Will call m_executor.stop()
v_uint64 getConnectionsCount Get connections count.

# AsyncHttpConnectionHandler::AsyncHttpConnectionHandler

  1. Constructor.
    AsyncHttpConnectionHandler(const std::shared_ptr<HttpProcessor::Components>& components, v_int32 threadCount = oatpp::async::Executor::VALUE_SUGGESTED)
    
  2. Constructor.
    AsyncHttpConnectionHandler(const std::shared_ptr<HttpProcessor::Components>& components, const std::shared_ptr<oatpp::async::Executor>& executor)
    
  3. Constructor.
    AsyncHttpConnectionHandler(const std::shared_ptr<HttpRouter>& router, v_int32 threadCount = oatpp::async::Executor::VALUE_SUGGESTED)
      : AsyncHttpConnectionHandler(std::make_shared<HttpProcessor::Components>(router), threadCount)
    
  4. Constructor.
    AsyncHttpConnectionHandler(const std::shared_ptr<HttpRouter>& router, const std::shared_ptr<oatpp::async::Executor>& executor)
      : AsyncHttpConnectionHandler(std::make_shared<HttpProcessor::Components>(router), executor)
    
  5. Constructor.
    AsyncHttpConnectionHandler(const std::shared_ptr<HttpRouter>& router,
                               const std::shared_ptr<HttpProcessor::Config>& config,
                               v_int32 threadCount = oatpp::async::Executor::VALUE_SUGGESTED)
      : AsyncHttpConnectionHandler(std::make_shared<HttpProcessor::Components>(router, config), threadCount)
    
  6. Constructor.
    AsyncHttpConnectionHandler(const std::shared_ptr<HttpRouter>& router,
                               const std::shared_ptr<HttpProcessor::Config>& config,
                               const std::shared_ptr<oatpp::async::Executor>& executor)
      : AsyncHttpConnectionHandler(std::make_shared<HttpProcessor::Components>(router, config), executor)
    

# AsyncHttpConnectionHandler::addRequestInterceptor

Add request interceptor. Request interceptors are called before routing happens. If multiple interceptors set then the order of interception is the same as the order of calls to addRequestInterceptor.

void addRequestInterceptor(const std::shared_ptr<interceptor::RequestInterceptor>& interceptor)

# AsyncHttpConnectionHandler::addResponseInterceptor

Add response interceptor. If multiple interceptors set then the order of interception is the same as the order of calls to addResponseInterceptor.

void addResponseInterceptor(const std::shared_ptr<interceptor::ResponseInterceptor>& interceptor)

# AsyncHttpConnectionHandler::stop

Will call m_executor.stop()

void stop() override

# AsyncHttpConnectionHandler::getConnectionsCount

Get connections count.

  • @return

v_uint64 getConnectionsCount()