#include <string>
#include <stdint.h>
#include <functional>
Go to the source code of this file.
◆ HTTPRequestHandler
Handler for requests to a certain HTTP path
◆ EventBase()
struct event_base* EventBase |
( |
| ) |
|
Return evhttp event base. This can be used by submodules to queue timers or custom events.
◆ InitHTTPServer()
Initialize HTTP server. Call this before RegisterHTTPHandler or EventBase().
◆ InterruptHTTPServer()
void InterruptHTTPServer |
( |
| ) |
|
Interrupt HTTP server threads
◆ RegisterHTTPHandler()
void RegisterHTTPHandler |
( |
const std::string & |
prefix, |
|
|
bool |
exactMatch, |
|
|
const HTTPRequestHandler & |
handler |
|
) |
| |
Register handler for prefix. If multiple handlers match a prefix, the first-registered one will be invoked.
◆ StartHTTPServer()
Start HTTP server. This is separate from InitHTTPServer to give users race-condition-free time to register their handlers between InitHTTPServer and StartHTTPServer.
◆ StopHTTPServer()
◆ UnregisterHTTPHandler()
void UnregisterHTTPHandler |
( |
const std::string & |
prefix, |
|
|
bool |
exactMatch |
|
) |
| |
Unregister handler for prefix
◆ UpdateHTTPServerLogging()
bool UpdateHTTPServerLogging |
( |
bool |
enable | ) |
|
Change logging level for libevent. Removes BCLog::LIBEVENT from log categories if libevent doesn't support debug logging.
◆ DEFAULT_HTTP_SERVER_TIMEOUT
const int DEFAULT_HTTP_SERVER_TIMEOUT =30 |
|
static |
◆ DEFAULT_HTTP_THREADS
const int DEFAULT_HTTP_THREADS =4 |
|
static |
◆ DEFAULT_HTTP_WORKQUEUE
const int DEFAULT_HTTP_WORKQUEUE =16 |
|
static |