MySQL 8.4.0
Source Code Documentation
http::HttpServerContext Class Reference

#include <http_server_context.h>

Public Types

using IoThreads = std::list< IoThread >
 

Public Member Functions

 HttpServerContext (net::io_context *context, IoThreads *io_threads, TlsServerContext &&tls_context, const std::string &host, const uint16_t port)
 
 HttpServerContext (net::io_context *context, IoThreads *io_threads, const std::string &host, const uint16_t port)
 
void start ()
 
void stop ()
 
void join_all ()
 
void add_route (const std::string &url_regex, std::unique_ptr< http::base::RequestHandler > cb)
 
void remove_route (const std::string &url_regex)
 
void remove_route (const void *handler_id)
 
bool is_ssl_configured ()
 
HttpRequestRouterrequest_router ()
 

Private Attributes

net::io_contextcontext_
 
TlsServerContext tls_context_
 
std::string host_
 
uint16_t port_
 
bool ssl_ {false}
 
server::Bind bind {context_, host_, port_}
 
server::Server http
 
HttpRequestRouter request_handler_
 

Member Typedef Documentation

◆ IoThreads

Constructor & Destructor Documentation

◆ HttpServerContext() [1/2]

http::HttpServerContext::HttpServerContext ( net::io_context context,
IoThreads io_threads,
TlsServerContext &&  tls_context,
const std::string &  host,
const uint16_t  port 
)

◆ HttpServerContext() [2/2]

http::HttpServerContext::HttpServerContext ( net::io_context context,
IoThreads io_threads,
const std::string &  host,
const uint16_t  port 
)

Member Function Documentation

◆ add_route()

void http::HttpServerContext::add_route ( const std::string &  url_regex,
std::unique_ptr< http::base::RequestHandler cb 
)

◆ is_ssl_configured()

bool http::HttpServerContext::is_ssl_configured ( )

◆ join_all()

void http::HttpServerContext::join_all ( )

◆ remove_route() [1/2]

void http::HttpServerContext::remove_route ( const std::string &  url_regex)

◆ remove_route() [2/2]

void http::HttpServerContext::remove_route ( const void *  handler_id)

◆ request_router()

HttpRequestRouter & http::HttpServerContext::request_router ( )

◆ start()

void http::HttpServerContext::start ( )

◆ stop()

void http::HttpServerContext::stop ( )

Member Data Documentation

◆ bind

server::Bind http::HttpServerContext::bind {context_, host_, port_}
private

◆ context_

net::io_context* http::HttpServerContext::context_
private

◆ host_

std::string http::HttpServerContext::host_
private

◆ http

server::Server http::HttpServerContext::http
private

◆ port_

uint16_t http::HttpServerContext::port_
private

◆ request_handler_

HttpRequestRouter http::HttpServerContext::request_handler_
private

◆ ssl_

bool http::HttpServerContext::ssl_ {false}
private

◆ tls_context_

TlsServerContext http::HttpServerContext::tls_context_
private

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