![]() |
MySQL 8.0.43
Source Code Documentation
|
Http server build on top of EventBase.
More...
#include <http_request.h>
Classes | |
| struct | impl |
Public Types | |
| using | CallbackRequest = void(*)(HttpRequest *, void *) |
| using | CallbackBuffer = EventBuffer(*)(EventBase *, void *) |
| using | SocketHandle = net::impl::socket::native_handle_type |
Public Member Functions | |
| EventHttp (EventBase *) | |
| EventHttp (EventHttp &&) | |
| ~EventHttp () | |
| void | set_allowed_http_methods (const HttpMethod::Bitset methods) |
| Set allowed methods for client request. More... | |
| EventHttpBoundSocket | accept_socket_with_handle (const SocketHandle fd) |
| Accept HTTP connection on specific socket. More... | |
| void | set_gencb (CallbackRequest cb, void *cbarg) |
| Set HTTP request callback. More... | |
| void | set_bevcb (CallbackBuffer cb, void *cbarg) |
| Set callback to create EventBuffer for new HTTP connection. More... | |
Private Attributes | |
| std::unique_ptr< impl > | pImpl_ |
Http server build on top of EventBase.
| using EventHttp::CallbackBuffer = EventBuffer (*)(EventBase *, void *) |
| using EventHttp::CallbackRequest = void (*)(HttpRequest *, void *) |
| EventHttp::EventHttp | ( | EventBase * | base | ) |
| EventHttp::EventHttp | ( | EventHttp && | http | ) |
|
default |
| EventHttpBoundSocket EventHttp::accept_socket_with_handle | ( | const SocketHandle | fd | ) |
Accept HTTP connection on specific socket.
| void EventHttp::set_allowed_http_methods | ( | const HttpMethod::Bitset | methods | ) |
Set allowed methods for client request.
Limit the number of methods that HTTP client can send to this HTTP server, which will be forward to callback specified in set_gencb.
| void EventHttp::set_bevcb | ( | CallbackBuffer | cb, |
| void * | cbarg | ||
| ) |
Set callback to create EventBuffer for new HTTP connection.
| void EventHttp::set_gencb | ( | CallbackRequest | cb, |
| void * | cbarg | ||
| ) |
Set HTTP request callback.
|
private |