Public Member Functions | Private Member Functions | Private Attributes
async_web_server_cpp::HttpServer Class Reference

#include <http_server.hpp>

List of all members.

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< HttpConnectionnew_connection_
HttpServerRequestHandler request_handler_
std::size_t thread_pool_size_
std::vector< boost::shared_ptr
< boost::thread > > 
threads_

Detailed Description

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 24 of file http_server.hpp.


Constructor & Destructor Documentation

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 7 of file http_server.cpp.

Definition at line 21 of file http_server.cpp.


Member Function Documentation

void async_web_server_cpp::HttpServer::handle_accept ( const boost::system::error_code &  e) [private]

Definition at line 44 of file http_server.cpp.

Definition at line 25 of file http_server.cpp.

Definition at line 36 of file http_server.cpp.

Definition at line 53 of file http_server.cpp.


Member Data Documentation

boost::asio::ip::tcp::acceptor async_web_server_cpp::HttpServer::acceptor_ [private]

Definition at line 41 of file http_server.hpp.

boost::asio::io_service async_web_server_cpp::HttpServer::io_service_ [private]

Definition at line 40 of file http_server.hpp.

Definition at line 44 of file http_server.hpp.

Definition at line 45 of file http_server.hpp.

Definition at line 42 of file http_server.hpp.

std::vector<boost::shared_ptr<boost::thread> > async_web_server_cpp::HttpServer::threads_ [private]

Definition at line 43 of file http_server.hpp.


The documentation for this class was generated from the following files:


async_web_server_cpp
Author(s): Mitchell Wills
autogenerated on Sat Jun 8 2019 18:56:51