#include <http_server.hpp>

Public Member Functions | |
| HttpServer (const std::string &address, const std::string &port, HttpServerRequestHandler request_handler, std::size_t thread_pool_size) | |
| void | run () |
| void | stop () |
| ~HttpServer () | |
Private Member Functions | |
| void | handle_accept (const boost::system::error_code &e) |
| void | start_accept () |
Private Attributes | |
| boost::asio::ip::tcp::acceptor | acceptor_ |
| boost::asio::io_service | io_service_ |
| boost::shared_ptr< HttpConnection > | new_connection_ |
| HttpServerRequestHandler | request_handler_ |
| std::size_t | thread_pool_size_ |
| std::vector< boost::shared_ptr< boost::thread > > | threads_ |
The HttpServer is an implementation of a HTTP server that serves http request from a given port The server maintains a pool of threads to use to serve requests. Each request is dispatched to the given request handler to be handled.
Definition at line 26 of file http_server.hpp.
| async_web_server_cpp::HttpServer::HttpServer | ( | const std::string & | address, |
| const std::string & | port, | ||
| HttpServerRequestHandler | request_handler, | ||
| std::size_t | thread_pool_size | ||
| ) |
Definition at line 8 of file http_server.cpp.
| async_web_server_cpp::HttpServer::~HttpServer | ( | ) |
Definition at line 25 of file http_server.cpp.
|
private |
Definition at line 49 of file http_server.cpp.
| void async_web_server_cpp::HttpServer::run | ( | ) |
Definition at line 30 of file http_server.cpp.
|
private |
Definition at line 41 of file http_server.cpp.
| void async_web_server_cpp::HttpServer::stop | ( | ) |
Definition at line 58 of file http_server.cpp.
|
private |
Definition at line 44 of file http_server.hpp.
|
private |
Definition at line 43 of file http_server.hpp.
|
private |
Definition at line 47 of file http_server.hpp.
|
private |
Definition at line 48 of file http_server.hpp.
|
private |
Definition at line 45 of file http_server.hpp.
|
private |
Definition at line 46 of file http_server.hpp.