26 #ifndef STATICLIB_PION_HTTP_REQUEST_READER_HPP
27 #define STATICLIB_PION_HTTP_REQUEST_READER_HPP
35 #include "staticlib/config.hpp"
59 tcp_connection_ptr tcp_conn;
64 uint32_t read_timeout_millis;
69 http_request_ptr request;
80 uint32_t read_timeout) :
84 read_timeout_millis(read_timeout),
86 request->set_remote_ip(tcp_conn->get_remote_ip());
87 request->set_request_reader(
this);
108 static void receive(std::unique_ptr<http_request_reader>
self);
118 static void consume_bytes(std::unique_ptr<http_request_reader>
self,
119 const std::error_code& read_error, std::size_t bytes_read);
126 static void consume_bytes(std::unique_ptr<http_request_reader>
self);
133 static void read_bytes_with_timeout(std::unique_ptr<http_request_reader>
self);
140 void handle_read_error(
const std::error_code& read_error);
148 void finished_parsing_headers(
const std::error_code& ec, sl::support::tribool& rc);
155 void finished_reading(
const std::error_code& ec);
162 #endif // STATICLIB_PION_HTTP_REQUEST_READER_HPP