MySQL 8.0.39
Source Code Documentation
EventHttp Class Reference

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< implpImpl_
 

Detailed Description

Http server build on top of EventBase.

Member Typedef Documentation

◆ CallbackBuffer

◆ CallbackRequest

using EventHttp::CallbackRequest = void (*)(HttpRequest *, void *)

◆ SocketHandle

Constructor & Destructor Documentation

◆ EventHttp() [1/2]

EventHttp::EventHttp ( EventBase base)

◆ EventHttp() [2/2]

EventHttp::EventHttp ( EventHttp &&  http)

◆ ~EventHttp()

EventHttp::~EventHttp ( )
default

Member Function Documentation

◆ accept_socket_with_handle()

EventHttpBoundSocket EventHttp::accept_socket_with_handle ( const SocketHandle  fd)

Accept HTTP connection on specific socket.

◆ set_allowed_http_methods()

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.

◆ set_bevcb()

void EventHttp::set_bevcb ( CallbackBuffer  cb,
void *  cbarg 
)

Set callback to create EventBuffer for new HTTP connection.

◆ set_gencb()

void EventHttp::set_gencb ( CallbackRequest  cb,
void *  cbarg 
)

Set HTTP request callback.

Member Data Documentation

◆ pImpl_

std::unique_ptr<impl> EventHttp::pImpl_
private

The documentation for this class was generated from the following files: