MySQL 8.4.2
Source Code Documentation
|
#include <connection.h>
Public Types | |
using | Parent = http::base::Connection< Socket > |
using | SessionId = uint32_t |
using | ConnectionStatusCallbacks = typename Parent::ConnectionStatusCallbacks |
Public Types inherited from http::base::Connection< Socket > | |
using | This = Connection< Socket > |
using | ConnectionStatusCallbacks = http::base::ConnectionStatusCallbacks< This > |
using | Methods = base::method::Bitset |
using | Headers = http::base::Headers |
using | owned_buffer = http::base::details::owned_buffer |
using | ref_buffers = http::base::details::ref_buffers< std::list< owned_buffer > > |
using | IO = Socket |
Public Types inherited from http::base::ConnectionInterface | |
using | IOBuffer = http::base::IOBuffer |
using | Headers = http::base::Headers |
Public Member Functions | |
ServerConnection (Socket s, base::method::Bitset *allowed_method, RequestHandlerInterface *rhi, ConnectionStatusCallbacks *connection_handler) | |
Public Member Functions inherited from http::base::Connection< Socket > | |
Connection (Socket s, base::method::Bitset *allowed_method, ConnectionStatusCallbacks *connection_handler, CNO_CONNECTION_KIND kind) | |
~Connection () override | |
bool | send (const uint32_t *stream_id_ptr, const int status_code, const std::string &method, const std::string &path, const Headers &headers, const IOBuffer &data) override |
std::string | get_peer_address () const override |
uint16_t | get_peer_port () const override |
Socket & | get_socket () |
void | start () override |
Public Member Functions inherited from http::base::ConnectionInterface | |
virtual | ~ConnectionInterface () |
Public Member Functions inherited from http::cno::CnoInterface | |
virtual | ~CnoInterface () |
Private Member Functions | |
int | on_cno_message_body (const uint32_t session_id, const char *data, const size_t size) override |
int | on_cno_message_tail (const uint32_t session_id, const cno_tail_t *tail) override |
int | on_cno_stream_end (const uint32_t id) override |
int | on_cno_message_head (const uint32_t session_id, const cno_message_t *msg) override |
Private Attributes | |
bool | first_request_ {true} |
std::map< SessionId, ServerRequest > | sessions_ |
RequestHandlerInterface * | request_handler_ |
Additional Inherited Members | |
Protected Member Functions inherited from http::base::Connection< Socket > | |
void | do_net_send () |
void | do_net_recv () |
Pending | on_net_receive (const std::error_code &ec, std::size_t bytes_transferred) |
Pending | on_net_send (const std::error_code &ec, size_t size) |
void | resume () |
void | suspend () |
bool | stop_running () |
Mark the connection that it should stop running. More... | |
virtual void | on_output_buffer_empty () |
int | on_cno_writev (const cno_buffer_t *buffer, size_t count) override |
int | on_cno_message_tail (const uint32_t session_id, const cno_tail_t *tail) override |
int | on_cno_stream_start (const uint32_t id) override |
int | on_cno_close () override |
Protected Attributes inherited from http::base::Connection< Socket > | |
bool | keep_alive_ |
Socket | socket_ |
Methods * | allowed_method_ |
cno_connection_t | cno_ |
uint8_t | input_buffer_ [512] |
net::mutable_buffer | input_mutable_buffer_ |
std::mutex | output_buffer_mutex_ |
std::list< owned_buffer > | output_buffers_ |
std::atomic< bool > | processed_request_ |
std::atomic< bool > | output_pending_ |
std::atomic< bool > | running_ |
std::atomic< bool > | suspend_ |
ConnectionStatusCallbacks * | connection_handler_ |
using http::server::ServerConnection< Socket >::ConnectionStatusCallbacks = typename Parent::ConnectionStatusCallbacks |
using http::server::ServerConnection< Socket >::Parent = http::base::Connection<Socket> |
using http::server::ServerConnection< Socket >::SessionId = uint32_t |
|
inline |
|
inlineoverrideprivatevirtual |
Implements http::cno::CnoInterface.
|
inlineoverrideprivatevirtual |
Implements http::cno::CnoInterface.
|
inlineoverrideprivatevirtual |
Implements http::cno::CnoInterface.
|
inlineoverrideprivatevirtual |
Implements http::cno::CnoInterface.
|
private |
|
private |
|
private |