10 std::size_t thread_pool_size)
11 : acceptor_(io_service_), thread_pool_size_(thread_pool_size),
12 request_handler_(request_handler)
15 boost::asio::ip::tcp::resolver resolver(
io_service_);
16 boost::asio::ip::tcp::resolver::query query(
17 address, port, boost::asio::ip::resolver_query_base::flags());
18 boost::asio::ip::tcp::endpoint endpoint = *resolver.resolve(query);
20 acceptor_.set_option(boost::asio::ip::tcp::acceptor::reuse_address(
true));
35 boost::shared_ptr<boost::thread> thread(
new boost::thread(
36 boost::bind(&boost::asio::io_service::run, &
io_service_)));
46 boost::asio::placeholders::error));
67 for (std::size_t i = 0; i <
threads_.size(); ++i)