aboutsummaryrefslogtreecommitdiffstats
path: root/include/http_server.h
diff options
context:
space:
mode:
authoripknHama <ipknhama@gmail.com>2014-12-12 01:48:56 +0900
committeripknHama <ipknhama@gmail.com>2014-12-12 01:48:56 +0900
commitad654da7115353baef19a4c87f53d4b88c02d4e5 (patch)
tree27b86384181a400863580dab1b719ca3b01d2a91 /include/http_server.h
parent21b027774e4c472d27d8726774aad1aaed95ea42 (diff)
parent966867a9ca8ca3dd9e783d628b8184563318d03c (diff)
downloadcrow-ad654da7115353baef19a4c87f53d4b88c02d4e5.tar.gz
crow-ad654da7115353baef19a4c87f53d4b88c02d4e5.zip
Merge branch 'acron0-get-middleware2'
Diffstat (limited to 'include/http_server.h')
-rw-r--r--include/http_server.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/http_server.h b/include/http_server.h
index 2241dec..bd35ba1 100644
--- a/include/http_server.h
+++ b/include/http_server.h
@@ -23,12 +23,13 @@ namespace crow
class Server
{
public:
- Server(Handler* handler, uint16_t port, uint16_t concurrency = 1)
+ Server(Handler* handler, uint16_t port, std::tuple<Middlewares...>* middlewares = nullptr, uint16_t concurrency = 1)
: acceptor_(io_service_, tcp::endpoint(asio::ip::address(), port)),
signals_(io_service_, SIGINT, SIGTERM),
handler_(handler),
concurrency_(concurrency),
- port_(port)
+ port_(port),
+ middlewares_(middlewares)
{
}
@@ -121,7 +122,6 @@ namespace crow
uint16_t port_;
unsigned int roundrobin_index_{};
- std::tuple<Middlewares...> middlewares_;
-
+ std::tuple<Middlewares...>* middlewares_;
};
}