diff options
-rw-r--r-- | httpd.cpp | 2 | ||||
-rw-r--r-- | httpd.h | 2 | ||||
-rw-r--r-- | main.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
@@ -43,7 +43,7 @@ void HTTPConnection::start() { boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)); } -HTTPServer::HTTPServer(boost::asio::io_service& io_service) : acceptor_(io_service, tcp::endpoint(tcp::v4(), 8000)) { +HTTPServer::HTTPServer(boost::asio::io_service& io_service, const tcp::endpoint& endpoint) : acceptor_(io_service, endpoint) { start_accept(); } @@ -31,7 +31,7 @@ class HTTPServer { tcp::acceptor acceptor_; public: - HTTPServer(boost::asio::io_service& io_service); + HTTPServer(boost::asio::io_service& io_service, const tcp::endpoint& endpoint); }; #endif @@ -15,7 +15,7 @@ int main(int argc, char **argv) { encoder::init(); boost::asio::io_service io_service; - HTTPServer httpd(io_service); + HTTPServer httpd(io_service, tcp::endpoint(tcp::v6(), 8000)); std::vector<boost::shared_ptr<boost::thread> > threads; for(std::size_t i = 0; i < 10; i++) { boost::shared_ptr<boost::thread> thread(new boost::thread(boost::bind(&boost::asio::io_service::run, &io_service))); |