mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-12 13:42:10 +02:00
http: switch servers from libevent to bitcoin
This commit is contained in:
@@ -75,8 +75,12 @@ void StopHTTPServer();
|
||||
void UpdateHTTPServerLogging(bool enable);
|
||||
} // namespace http_libevent
|
||||
|
||||
namespace http_bitcoin {
|
||||
class HTTPRequest;
|
||||
}
|
||||
/** Handler for requests to a certain HTTP path */
|
||||
typedef std::function<void(http_libevent::HTTPRequest* req, const std::string &)> HTTPRequestHandler;
|
||||
using HTTPRequestHandler = std::function<void(http_bitcoin::HTTPRequest* req, const std::string&)>;
|
||||
|
||||
/** Register handler for prefix.
|
||||
* If multiple handlers match a prefix, the first-registered one will
|
||||
* be invoked.
|
||||
@@ -86,11 +90,6 @@ void RegisterHTTPHandler(const std::string &prefix, bool exactMatch, const HTTPR
|
||||
void UnregisterHTTPHandler(const std::string &prefix, bool exactMatch);
|
||||
|
||||
namespace http_libevent {
|
||||
/** Return evhttp event base. This can be used by submodules to
|
||||
* queue timers or custom events.
|
||||
*/
|
||||
struct event_base* EventBase();
|
||||
|
||||
/** In-flight HTTP request.
|
||||
* Thin C++ wrapper around evhttp_request.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user