MySQL 8.0.39
Source Code Documentation
server_mock::MySQLXProtocol Class Reference

#include <x_mock_session.h>

Inheritance diagram for server_mock::MySQLXProtocol:
[legend]

Public Member Functions

stdx::expected< size_t, std::error_code > decode_frame (std::vector< uint8_t > &payload)
 
stdx::expected< std::tuple< uint8_t, size_t >, std::error_code > recv_header (const net::const_buffer &buf)
 
stdx::expected< std::pair< xcl::XProtocol::Client_message_type_id, std::unique_ptr< xcl::XProtocol::Message > >, std::error_code > decode_single_message (const std::vector< uint8_t > &payload)
 
void encode_error (const ErrorResponse &msg) override
 
void encode_ok (const uint64_t affected_rows=0, const uint64_t last_insert_id=0, const uint16_t server_status=0, const uint16_t warning_count=0) override
 
void encode_resultset (const ResultsetResponse &response) override
 
void encode_message (const xcl::XProtocol::Server_message_type_id msg_id, const xcl::XProtocol::Message &msg)
 
void encode_async_notice (const AsyncNotice &async_notice)
 
stdx::expected< std::unique_ptr< xcl::XProtocol::Message >, std::string > gr_state_changed_from_json (const std::string &json_string)
 
stdx::expected< std::unique_ptr< xcl::XProtocol::Message >, std::string > get_notice_message (const unsigned id, const std::string &payload)
 
 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
 
void encode_ok (const OkResponse &resp)
 
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 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 ()
 

Public Attributes

Mysqlx::Notice::Frame notice_frame
 

Private Attributes

XProtocolEncoder protocol_encoder_
 
XProtocolDecoder protocol_decoder_
 

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

◆ decode_frame()

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

◆ decode_single_message()

stdx::expected< std::pair< xcl::XProtocol::Client_message_type_id, std::unique_ptr< xcl::XProtocol::Message > >, std::error_code > server_mock::MySQLXProtocol::decode_single_message ( const std::vector< uint8_t > &  payload)

◆ encode_async_notice()

void server_mock::MySQLXProtocol::encode_async_notice ( const AsyncNotice async_notice)

◆ encode_error()

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

◆ encode_message()

void server_mock::MySQLXProtocol::encode_message ( const xcl::XProtocol::Server_message_type_id  msg_id,
const xcl::XProtocol::Message &  msg 
)

◆ encode_ok()

void server_mock::MySQLXProtocol::encode_ok ( const uint64_t  affected_rows = 0,
const uint64_t  last_insert_id = 0,
const uint16_t  server_status = 0,
const uint16_t  warning_count = 0 
)
overridevirtual

◆ encode_resultset()

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

◆ get_notice_message()

stdx::expected< std::unique_ptr< xcl::XProtocol::Message >, std::string > server_mock::MySQLXProtocol::get_notice_message ( const unsigned  id,
const std::string &  payload 
)

◆ gr_state_changed_from_json()

stdx::expected< std::unique_ptr< xcl::XProtocol::Message >, std::string > server_mock::MySQLXProtocol::gr_state_changed_from_json ( const std::string &  json_string)

◆ 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 
)

◆ recv_header()

stdx::expected< std::tuple< uint8_t, size_t >, std::error_code > server_mock::MySQLXProtocol::recv_header ( const net::const_buffer buf)

Member Data Documentation

◆ notice_frame

Mysqlx::Notice::Frame server_mock::MySQLXProtocol::notice_frame

◆ protocol_decoder_

XProtocolDecoder server_mock::MySQLXProtocol::protocol_decoder_
private

◆ protocol_encoder_

XProtocolEncoder server_mock::MySQLXProtocol::protocol_encoder_
private

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