4 #include <ail/file.hpp>
5 #include <ail/types.hpp>
6 #include <boost/asio.hpp>
7 #include <theodwalha/temporary.hpp>
8 #include <theodwalha/request.hpp>
9 #include <theodwalha/module_manager.hpp>
11 struct http_server_client
13 boost::asio::ip::tcp::socket socket
;
15 std::string extended_buffer
;
16 std::string temporary_file_name
;
17 temporary_file_manager
& file_manager
;
18 ail::file temporary_file
;
19 std::size_t bytes_read
;
20 uword keep_alive_counter
;
21 module_manager
& modules
;
24 http_request current_request
;
26 http_server_client(boost::asio::io_service
& io_service
, temporary_file_manager
& file_manager
, module_manager
& modules
);
27 ~http_server_client();
33 void write(std::string
const & data
);
35 void read_event(boost::system::error_code
const & error
, std::size_t bytes_in_buffer
);
36 void write_event(boost::system::error_code
const & error
, char * write_buffer
);
38 bool http_server_client::generate_content(http_request
& request
, module_result
& result
, std::string
& content
);