diff options
Diffstat (limited to 'http_server.h')
-rw-r--r-- | http_server.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/http_server.h b/http_server.h index 387f2e5..3ca88f2 100644 --- a/http_server.h +++ b/http_server.h @@ -6,9 +6,7 @@ #include "http_connection.h" #include "datetime.h" - -// TEST -#include <iostream> +#include "logging.h" namespace crow { @@ -23,7 +21,8 @@ namespace crow socket_(io_service_), signals_(io_service_, SIGINT, SIGTERM), handler_(handler), - concurrency_(concurrency) + concurrency_(concurrency), + port_(port) { do_accept(); } @@ -36,6 +35,8 @@ namespace crow std::async(std::launch::async, [this]{io_service_.run();}) ); + CROW_LOG_INFO << server_name_ << " server is running, local port " << port_; + signals_.async_wait( [&](const boost::system::error_code& error, int signal_number){ io_service_.stop(); @@ -70,5 +71,6 @@ namespace crow uint16_t concurrency_ = {1}; std::string server_name_ = "Crow/0.1"; + uint16_t port_; }; } |