LLVM: llvm::HTTPServer Class Reference (original) (raw)
An HTTP server which can listen on a single TCP/IP port for HTTP requests and delgate them to the appropriate registered handler. More...
#include "[llvm/Debuginfod/HTTPServer.h](HTTPServer%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| HTTPServer () | |
| ~HTTPServer () | |
| Error | get (StringRef UrlPathPattern, HTTPRequestHandler Handler) |
| Registers a URL pattern routing rule. | |
| Error | bind (unsigned Port, const char *HostInterface="0.0.0.0") |
| Attempts to assign the requested port and interface, returning an Error upon failure. | |
| Expected< unsigned > | bind (const char *HostInterface="0.0.0.0") |
| Attempts to assign any available port and interface, returning either the port number or an Error upon failure. | |
| Error | listen () |
| Attempts to listen for requests on the bound port. | |
| void | stop () |
| If the server is listening, stop and unbind the socket. |
| Static Public Member Functions | |
|---|---|
| static bool | isAvailable () |
| Returns true only if LLVM has been compiled with a working HTTPServer. |
An HTTP server which can listen on a single TCP/IP port for HTTP requests and delgate them to the appropriate registered handler.
Definition at line 99 of file HTTPServer.h.
| HTTPServer::HTTPServer ( ) | default |
|---|
◆ ~HTTPServer()
| HTTPServer::~HTTPServer ( ) | default |
|---|
◆ bind() [1/2]
◆ bind() [2/2]
◆ get()
Registers a URL pattern routing rule.
When the server is listening, each request is dispatched to the first registered handler whose UrlPathPattern matches the UrlPath.
Definition at line 175 of file HTTPServer.cpp.
References llvm::Error::success().
◆ isAvailable()
| bool HTTPServer::isAvailable ( ) | static |
|---|
◆ listen()
| Error HTTPServer::listen | ( | ) |
|---|
◆ stop()
| void HTTPServer::stop | ( | ) |
|---|
The documentation for this class was generated from the following files:
- include/llvm/Debuginfod/HTTPServer.h
- lib/Debuginfod/HTTPServer.cpp