aboutsummaryrefslogtreecommitdiff
path: root/src/httpserver.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2016-07-29 11:28:49 +0200
committerWladimir J. van der Laan <[email protected]>2016-07-29 11:29:00 +0200
commitb77bb95b3cb414ffef91d4ac11c4b15720200712 (patch)
tree143ae7154ffd16a8b61d80a73a8028b73eb378d8 /src/httpserver.h
parentMerge #8408: Prevent fingerprinting, disk-DoS with compact blocks (diff)
parenthttpserver: replace boost threads with std (diff)
downloaddiscoin-b77bb95b3cb414ffef91d4ac11c4b15720200712.tar.xz
discoin-b77bb95b3cb414ffef91d4ac11c4b15720200712.zip
Merge #8421: httpserver: drop boost (#8023 dependency)
7e87033 httpserver: replace boost threads with std (Cory Fields) d3773ca httpserver: explicitly detach worker threads (Cory Fields) 755aa05 httpserver: use a future rather than relying on boost's try_join_for (Cory Fields)
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 20a119cc5..0e30e666a 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;
};