1 /*! 2 * @file 3 * @brief A list of factories for HTTP connection-handlers. 4 */ 5 #pragma once 6 7 #include <arataga/acl_handler/handlers/http/basics.hpp> 8 9 namespace arataga::acl_handler 10 { 11 12 namespace handlers::http 13 { 14 15 [[nodiscard]] 16 connection_handler_shptr_t 17 make_negative_response_sender( 18 handler_context_holder_t ctx, 19 handler_context_t::connection_id_t id, 20 asio::ip::tcp::socket connection, 21 remove_reason_t remove_reason, 22 arataga::utils::string_literal_t negative_response ); 23 24 [[nodiscard]] 25 connection_handler_shptr_t 26 make_authentification_handler( 27 handler_context_holder_t ctx, 28 handler_context_t::connection_id_t id, 29 asio::ip::tcp::socket connection, 30 http_handling_state_unique_ptr_t http_handling_state, 31 request_info_t request_info ); 32 33 [[nodiscard]] 34 connection_handler_shptr_t 35 make_dns_lookup_handler( 36 handler_context_holder_t ctx, 37 handler_context_t::connection_id_t id, 38 asio::ip::tcp::socket connection, 39 http_handling_state_unique_ptr_t http_handling_state, 40 request_info_t request_info, 41 traffic_limiter_unique_ptr_t traffic_limiter ); 42 43 [[nodiscard]] 44 connection_handler_shptr_t 45 make_target_connector_handler( 46 handler_context_holder_t ctx, 47 handler_context_t::connection_id_t id, 48 asio::ip::tcp::socket connection, 49 http_handling_state_unique_ptr_t http_handling_state, 50 request_info_t request_info, 51 asio::ip::tcp::endpoint target_endpoint, 52 traffic_limiter_unique_ptr_t traffic_limiter ); 53 54 // 55 // Note: factories make_connect_method_handler and 56 // make_ordinary_method_handler have the same prototypes. 57 // It was made intentionaly. That allows to use them via 58 // a common type of pointer to function. 59 // 60 [[nodiscard]] 61 connection_handler_shptr_t 62 make_connect_method_handler( 63 handler_context_holder_t ctx, 64 handler_context_t::connection_id_t id, 65 asio::ip::tcp::socket connection, 66 http_handling_state_unique_ptr_t http_state, 67 request_info_t request_info, 68 traffic_limiter_unique_ptr_t traffic_limiter, 69 asio::ip::tcp::socket out_connection ); 70 71 [[nodiscard]] 72 connection_handler_shptr_t 73 make_ordinary_method_handler( 74 handler_context_holder_t ctx, 75 handler_context_t::connection_id_t id, 76 asio::ip::tcp::socket in_connection, 77 http_handling_state_unique_ptr_t http_state, 78 request_info_t request_info, 79 traffic_limiter_unique_ptr_t traffic_limiter, 80 asio::ip::tcp::socket out_connection ); 81 82 } /* namespace arataga::acl_handler */ 83 84 } /* namespace handlers::http */ 85 86