Server API rework.
This commit is contained in:
+1
-6
@@ -11,8 +11,7 @@ using tcp = boost::asio::ip::tcp;
|
||||
|
||||
namespace webcc {
|
||||
|
||||
Server::Server(std::uint16_t port, std::size_t workers,
|
||||
const std::string& doc_root)
|
||||
Server::Server(std::uint16_t port, std::size_t workers, const Path& doc_root)
|
||||
: acceptor_(io_context_), signals_(io_context_), workers_(workers),
|
||||
request_handler_(doc_root) {
|
||||
RegisterSignals();
|
||||
@@ -52,10 +51,6 @@ Server::Server(std::uint16_t port, std::size_t workers,
|
||||
}
|
||||
}
|
||||
|
||||
bool Server::Bind(ServicePtr service, const std::string& url, bool is_regex) {
|
||||
return request_handler_.Bind(service, url, is_regex);
|
||||
}
|
||||
|
||||
void Server::Run() {
|
||||
if (!acceptor_.is_open()) {
|
||||
LOG_ERRO("Server is NOT going to run.");
|
||||
|
||||
Reference in New Issue
Block a user