MySQL 9.1.0
Source Code Documentation
server_mock::MySQLClassicProtocol Class Reference

#include <classic_mock_session.h>

Inheritance diagram for server_mock::MySQLClassicProtocol:
[legend]

Public Member Functions

stdx::expected< size_t, std::error_code > read_packet (std::vector< uint8_t > &payload)
 
void encode_error (const ErrorResponse &msg) override
 
void encode_ok (const OkResponse &msg) override
 
void encode_resultset (const ResultsetResponse &response) override
 
void encode_auth_fast_message ()
 
void encode_auth_switch_message (const classic_protocol::message::server::AuthMethodSwitch &msg)
 
void encode_server_greeting (const classic_protocol::message::server::Greeting &greeting)
 
void seq_no (uint8_t no)
 
uint8_t seq_no () const
 
classic_protocol::capabilities::value_type server_capabilities () const
 
void server_capabilities (classic_protocol::capabilities::value_type v)
 
classic_protocol::capabilities::value_type client_capabilities () const
 
void client_capabilities (classic_protocol::capabilities::value_type v)
 
classic_protocol::capabilities::value_type shared_capabilities () const
 
 ProtocolBase (socket_type client_sock, endpoint_type client_ep, TlsServerContext &tls_ctx)
 
 ProtocolBase (const ProtocolBase &)=delete
 
 ProtocolBase (ProtocolBase &&)=delete
 
- Public Member Functions inherited from server_mock::ProtocolBase
 ProtocolBase (socket_type client_sock, endpoint_type client_ep, TlsServerContext &tls_ctx)
 
 ProtocolBase (const ProtocolBase &)=delete
 
 ProtocolBase (ProtocolBase &&)=delete
 
ProtocolBaseoperator= (const ProtocolBase &)=delete
 
ProtocolBaseoperator= (ProtocolBase &&rhs)=delete
 
virtual ~ProtocolBase ()=default
 
stdx::expected< size_t, std::error_code > read_ssl (const net::mutable_buffer &buf)
 
stdx::expected< size_t, std::error_code > write_ssl (const net::const_buffer &buf)
 
stdx::expected< size_t, std::error_code > avail_ssl ()
 
template<class CompletionToken >
void async_send_tls (CompletionToken &&token)
 
template<class CompletionToken >
void async_send (CompletionToken &&token)
 
template<class CompletionToken >
void async_receive_tls (CompletionToken &&token)
 
template<class CompletionToken >
void async_receive (CompletionToken &&token)
 
template<class CompletionToken >
void async_tls_accept (CompletionToken &&token)
 
const std::vector< uint8_t > & send_buffer () const
 
const net::ip::tcp::socketclient_socket () const
 
void username (const std::string &username)
 
std::string username () const
 
void server_auth_method_name (const std::string &auth_method_name)
 
std::string server_auth_method_name () const
 
void server_auth_method_data (const std::string &auth_method_data)
 
std::string server_auth_method_data () const
 
void auth_method_name (const std::string &auth_method_name)
 
std::string auth_method_name () const
 
void auth_method_data (const std::string &auth_method_data)
 
std::string auth_method_data () const
 
void init_tls ()
 
bool is_tls ()
 
const SSL * ssl () const
 
stdx::expected< void, std::error_code > tls_accept ()
 
net::steady_timerexec_timer ()
 
void cancel ()
 
void terminate ()
 terminate the current connection. More...
 
net::io_contextio_context ()
 

Private Attributes

uint8_t seq_no_ {0}
 
classic_protocol::capabilities::value_type server_capabilities_ {}
 
classic_protocol::capabilities::value_type client_capabilities_ {}
 

Additional Inherited Members

- Public Types inherited from server_mock::ProtocolBase
using protocol_type = net::ip::tcp
 
using socket_type = typename protocol_type::socket
 
using endpoint_type = typename protocol_type::endpoint
 
- Static Public Member Functions inherited from server_mock::ProtocolBase
static std::error_code map_tls_error_code (std::error_code ec)
 
static bool authenticate (const std::string &auth_method_name, const std::string &auth_method_data, const std::string &password, const std::vector< uint8_t > &auth_response)
 
- Protected Attributes inherited from server_mock::ProtocolBase
socket_type client_socket_
 
endpoint_type client_ep_
 
net::steady_timer exec_timer_ {io_context()}
 
std::string username_ {}
 
std::string server_auth_method_name_ {}
 
std::string server_auth_method_data_ {}
 
std::string auth_method_name_ {}
 
std::string auth_method_data_ {}
 
TlsServerContexttls_ctx_
 
std::unique_ptr< SSL, SSL_Deleterssl_
 
std::vector< uint8_t > recv_buffer_
 
std::vector< uint8_t > send_buffer_
 

Member Function Documentation

◆ client_capabilities() [1/2]

classic_protocol::capabilities::value_type server_mock::MySQLClassicProtocol::client_capabilities ( ) const
inline

◆ client_capabilities() [2/2]

void server_mock::MySQLClassicProtocol::client_capabilities ( classic_protocol::capabilities::value_type  v)
inline

◆ encode_auth_fast_message()

void server_mock::MySQLClassicProtocol::encode_auth_fast_message ( )

◆ encode_auth_switch_message()

void server_mock::MySQLClassicProtocol::encode_auth_switch_message ( const classic_protocol::message::server::AuthMethodSwitch msg)

◆ encode_error()

void server_mock::MySQLClassicProtocol::encode_error ( const ErrorResponse msg)
overridevirtual

◆ encode_ok()

void server_mock::MySQLClassicProtocol::encode_ok ( const OkResponse msg)
overridevirtual

◆ encode_resultset()

void server_mock::MySQLClassicProtocol::encode_resultset ( const ResultsetResponse response)
overridevirtual

◆ encode_server_greeting()

void server_mock::MySQLClassicProtocol::encode_server_greeting ( const classic_protocol::message::server::Greeting greeting)

◆ ProtocolBase() [1/3]

server_mock::ProtocolBase::ProtocolBase ( const ProtocolBase )
delete

◆ ProtocolBase() [2/3]

server_mock::ProtocolBase::ProtocolBase ( ProtocolBase &&  )
delete

◆ ProtocolBase() [3/3]

server_mock::ProtocolBase::ProtocolBase ( ProtocolBase::socket_type  client_sock,
ProtocolBase::endpoint_type  client_ep,
TlsServerContext tls_ctx 
)

◆ read_packet()

stdx::expected< size_t, std::error_code > server_mock::MySQLClassicProtocol::read_packet ( std::vector< uint8_t > &  payload)

◆ seq_no() [1/2]

uint8_t server_mock::MySQLClassicProtocol::seq_no ( ) const
inline

◆ seq_no() [2/2]

void server_mock::MySQLClassicProtocol::seq_no ( uint8_t  no)
inline

◆ server_capabilities() [1/2]

classic_protocol::capabilities::value_type server_mock::MySQLClassicProtocol::server_capabilities ( ) const
inline

◆ server_capabilities() [2/2]

void server_mock::MySQLClassicProtocol::server_capabilities ( classic_protocol::capabilities::value_type  v)
inline

◆ shared_capabilities()

classic_protocol::capabilities::value_type server_mock::MySQLClassicProtocol::shared_capabilities ( ) const
inline

Member Data Documentation

◆ client_capabilities_

classic_protocol::capabilities::value_type server_mock::MySQLClassicProtocol::client_capabilities_ {}
private

◆ seq_no_

uint8_t server_mock::MySQLClassicProtocol::seq_no_ {0}
private

◆ server_capabilities_

classic_protocol::capabilities::value_type server_mock::MySQLClassicProtocol::server_capabilities_ {}
private

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