MySQL 9.1.0
Source Code Documentation
http::client::Connection< IOLayer > Class Template Reference

#include <connection.h>

Inheritance diagram for http::client::Connection< IOLayer >:
[legend]

Public Types

using Parent = http::base::Connection< IOLayer >
 
using IOBuffer = typename Parent::IOBuffer
 
using Headers = typename Parent::Headers
 
using ConnectionStatusCallbacks = typename Parent::ConnectionStatusCallbacks
 
- Public Types inherited from http::base::Connection< IOLayer >
using This = Connection< IOLayer >
 
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 = IOLayer
 
- Public Types inherited from http::base::ConnectionInterface
using IOBuffer = http::base::IOBuffer
 
using Headers = http::base::Headers
 

Public Member Functions

 Connection (IOLayer s, base::method::Bitset *allowed_method, ConnectionStatusCallbacks *connection_handler, PayloadCallback *payload_callback, bool use_http2)
 
void start () override
 
int on_settings () override
 
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
 
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
 
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
 
void on_output_buffer_empty () override
 
- Public Member Functions inherited from http::base::Connection< IOLayer >
 Connection (IOLayer s, base::method::Bitset *allowed_method, ConnectionStatusCallbacks *connection_handler, CNO_CONNECTION_KIND kind, CNO_HTTP_VERSION version)
 
 ~Connection () override
 
std::string get_peer_address () const override
 
uint16_t get_peer_port () const override
 
IOLayer & get_socket ()
 
- Public Member Functions inherited from http::base::ConnectionInterface
virtual ~ConnectionInterface ()
 
- Public Member Functions inherited from http::cno::CnoInterface
virtual ~CnoInterface ()
 

Public Attributes

PayloadCallbackpayload_
 
bool initial_settings_received_
 
bool response_received_ {false}
 

Additional Inherited Members

- Protected Member Functions inherited from http::base::Connection< IOLayer >
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...
 
int on_cno_writev (const cno_buffer_t *buffer, size_t count) override
 
int on_cno_stream_start (const uint32_t id) override
 
int on_cno_close () override
 
- Protected Attributes inherited from http::base::Connection< IOLayer >
bool keep_alive_ {true}
 
IOLayer socket_
 
Methodsallowed_method_
 
cno_connection_t cno_
 
uint8_t input_buffer_ [512]
 
net::mutable_buffer input_mutable_buffer_ {net::buffer(input_buffer_)}
 
std::mutex output_buffer_mutex_
 
std::list< owned_bufferoutput_buffers_
 
std::atomic< bool > processed_request_ {false}
 
std::atomic< bool > output_pending_ {false}
 
std::atomic< bool > running_ {true}
 
std::atomic< bool > suspend_ {false}
 
ConnectionStatusCallbacksconnection_handler_
 

Member Typedef Documentation

◆ ConnectionStatusCallbacks

template<typename IOLayer >
using http::client::Connection< IOLayer >::ConnectionStatusCallbacks = typename Parent::ConnectionStatusCallbacks

◆ Headers

template<typename IOLayer >
using http::client::Connection< IOLayer >::Headers = typename Parent::Headers

◆ IOBuffer

template<typename IOLayer >
using http::client::Connection< IOLayer >::IOBuffer = typename Parent::IOBuffer

◆ Parent

template<typename IOLayer >
using http::client::Connection< IOLayer >::Parent = http::base::Connection<IOLayer>

Constructor & Destructor Documentation

◆ Connection()

template<typename IOLayer >
http::client::Connection< IOLayer >::Connection ( IOLayer  s,
base::method::Bitset allowed_method,
ConnectionStatusCallbacks connection_handler,
PayloadCallback payload_callback,
bool  use_http2 
)
inline

Member Function Documentation

◆ on_cno_message_body()

template<typename IOLayer >
int http::client::Connection< IOLayer >::on_cno_message_body ( const uint32_t  session_id,
const char *  data,
const size_t  size 
)
inlineoverridevirtual

◆ on_cno_message_head()

template<typename IOLayer >
int http::client::Connection< IOLayer >::on_cno_message_head ( const uint32_t  session_id,
const cno_message_t *  msg 
)
inlineoverridevirtual

◆ on_cno_message_tail()

template<typename IOLayer >
int http::client::Connection< IOLayer >::on_cno_message_tail ( const uint32_t  session_id,
const cno_tail_t *  tail 
)
inlineoverridevirtual

Reimplemented from http::base::Connection< IOLayer >.

◆ on_cno_stream_end()

template<typename IOLayer >
int http::client::Connection< IOLayer >::on_cno_stream_end ( const uint32_t  id)
inlineoverridevirtual

◆ on_output_buffer_empty()

template<typename IOLayer >
void http::client::Connection< IOLayer >::on_output_buffer_empty ( )
inlineoverridevirtual

Reimplemented from http::base::Connection< IOLayer >.

◆ on_settings()

template<typename IOLayer >
int http::client::Connection< IOLayer >::on_settings ( )
inlineoverridevirtual

◆ send()

template<typename IOLayer >
bool http::client::Connection< IOLayer >::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 
)
inlineoverridevirtual

Reimplemented from http::base::Connection< IOLayer >.

◆ start()

template<typename IOLayer >
void http::client::Connection< IOLayer >::start ( )
inlineoverridevirtual

Reimplemented from http::base::Connection< IOLayer >.

Member Data Documentation

◆ initial_settings_received_

template<typename IOLayer >
bool http::client::Connection< IOLayer >::initial_settings_received_

◆ payload_

template<typename IOLayer >
PayloadCallback* http::client::Connection< IOLayer >::payload_

◆ response_received_

template<typename IOLayer >
bool http::client::Connection< IOLayer >::response_received_ {false}

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