HttpConnectionHandler.hpp

This File On Github
Ask A Question

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

HttpConnectionHandler

Simple ConnectionHandler (oatpp::network::server::ConnectionHandler) for handling HTTP communication.
Will create one thread per each connection to handle communication.

namespace oatpp { namespace web { namespace server { 
  class HttpConnectionHandler : public base::Countable, public network::server::ConnectionHandler {}
}}}

Methods

Return Type Name Summary
[none] HttpConnectionHandler Constructor.
std::shared_ptr<HttpConnectionHandler> createShared Create shared HttpConnectionHandler.
void setErrorHandler Set root error handler for all requests coming through this Connection Handler.
void addRequestInterceptor Set request interceptor. Request intercepted after route is resolved but before corresponding route endpoint is called.
void handleConnection Implementation of oatpp::network::server::ConnectionHandler::handleConnection().
void stop Tell all worker threads to exit when done.

HttpConnectionHandler::HttpConnectionHandler

Constructor.

HttpConnectionHandler(const std::shared_ptr<HttpRouter>& router)

HttpConnectionHandler::createShared

Create shared HttpConnectionHandler.

static std::shared_ptr<HttpConnectionHandler> createShared(const std::shared_ptr<HttpRouter>& router)

HttpConnectionHandler::setErrorHandler

Set root error handler for all requests coming through this Connection Handler. All unhandled errors will be handled by this error handler.

void setErrorHandler(const std::shared_ptr<handler::ErrorHandler>& errorHandler)

HttpConnectionHandler::addRequestInterceptor

Set request interceptor. Request intercepted after route is resolved but before corresponding route endpoint is called.

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

HttpConnectionHandler::handleConnection

Implementation of oatpp::network::server::ConnectionHandler::handleConnection().

void handleConnection(const std::shared_ptr<IOStream>& connection, const std::shared_ptr<const ParameterMap>& params) override

HttpConnectionHandler::stop

Tell all worker threads to exit when done.

void stop() override