aboutsummaryrefslogtreecommitdiff
path: root/src/httpserver.h
diff options
context:
space:
mode:
authorCory Fields <cory-nospam-@coryfields.com>2016-07-28 18:31:25 -0400
committerCory Fields <cory-nospam-@coryfields.com>2016-07-28 19:08:04 -0400
commit7e87033447149e54d9b5ab2f90ad3a7ed094d784 (patch)
tree40da082665712446b5048551cc5a019b11c2bf35 /src/httpserver.h
parentd3773ca9aeb0d2f12dc0c5a0726778050c8cb455 (diff)
httpserver: replace boost threads with std
along with mutex/condvar/bind/etc. httpserver handles its own interruption, so there's no reason not to use std threading. While we're at it, may as well kill the BOOST_FOREACH's as well.
Diffstat (limited to 'src/httpserver.h')
-rw-r--r--src/httpserver.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/httpserver.h b/src/httpserver.h
index 20a119cc5c..0e30e666a6 100644
--- a/src/httpserver.h
+++ b/src/httpserver.h
@@ -7,9 +7,7 @@
#include <string>
#include <stdint.h>
-#include <boost/thread.hpp>
-#include <boost/scoped_ptr.hpp>
-#include <boost/function.hpp>
+#include <functional>
static const int DEFAULT_HTTP_THREADS=4;
static const int DEFAULT_HTTP_WORKQUEUE=16;
@@ -35,7 +33,7 @@ void InterruptHTTPServer();
void StopHTTPServer();
/** Handler for requests to a certain HTTP path */
-typedef boost::function<void(HTTPRequest* req, const std::string &)> HTTPRequestHandler;
+typedef std::function<void(HTTPRequest* req, const std::string &)> HTTPRequestHandler;
/** Register handler for prefix.
* If multiple handlers match a prefix, the first-registered one will
* be invoked.
@@ -132,7 +130,7 @@ public:
* deleteWhenTriggered deletes this event object after the event is triggered (and the handler called)
* handler is the handler to call when the event is triggered.
*/
- HTTPEvent(struct event_base* base, bool deleteWhenTriggered, const boost::function<void(void)>& handler);
+ HTTPEvent(struct event_base* base, bool deleteWhenTriggered, const std::function<void(void)>& handler);
~HTTPEvent();
/** Trigger the event. If tv is 0, trigger it immediately. Otherwise trigger it after
@@ -141,7 +139,7 @@ public:
void trigger(struct timeval* tv);
bool deleteWhenTriggered;
- boost::function<void(void)> handler;
+ std::function<void(void)> handler;
private:
struct event* ev;
};