MySQL 9.0.0
Source Code Documentation
server_mock::MySQLServerMockSessionX Class Reference

#include <x_mock_session.h>

Inheritance diagram for server_mock::MySQLServerMockSessionX:
[legend]

Public Types

using clock_type = std::chrono::steady_clock
 

Public Member Functions

 MySQLServerMockSessionX (ProtocolBase::socket_type client_sock, ProtocolBase::endpoint_type client_ep, TlsServerContext &tls_server_ctx, std::unique_ptr< StatementReaderBase > statement_processor, const bool debug_mode, bool with_tls)
 
void run () override
 
void cancel () override
 
void terminate () override
 
bool encode_due_async_notices (const clock_type::time_point &start_time)
 encode all async notices. More...
 
clock_type::time_point notice_expiry () const
 expiry of the notice. More...
 
- Public Member Functions inherited from server_mock::MySQLServerMockSession
 MySQLServerMockSession (std::unique_ptr< StatementReaderBase > statement_processor, const bool debug_mode)
 
virtual ~MySQLServerMockSession ()=default
 
bool debug_mode () const
 
void disconnector (std::function< void()> func)
 
void disconnect ()
 

Private Member Functions

void greeting ()
 
void handshake ()
 
void idle ()
 
void finish ()
 
void notices ()
 
void send_response_then_handshake ()
 
void send_response_then_first_idle ()
 
void send_response_then_idle ()
 
void send_response_then_disconnect ()
 
void send_notice_then_notices ()
 

Private Attributes

std::vector< AsyncNoticeasync_notices_
 
MySQLXProtocol protocol_
 
bool with_tls_ {false}
 
clock_type::time_point start_time_ {}
 
net::steady_timer notice_timer_ {protocol_.io_context()}
 

Additional Inherited Members

- Protected Attributes inherited from server_mock::MySQLServerMockSession
std::unique_ptr< StatementReaderBasejson_reader_
 

Member Typedef Documentation

◆ clock_type

using server_mock::MySQLServerMockSessionX::clock_type = std::chrono::steady_clock

Constructor & Destructor Documentation

◆ MySQLServerMockSessionX()

server_mock::MySQLServerMockSessionX::MySQLServerMockSessionX ( ProtocolBase::socket_type  client_sock,
ProtocolBase::endpoint_type  client_ep,
TlsServerContext tls_server_ctx,
std::unique_ptr< StatementReaderBase statement_processor,
const bool  debug_mode,
bool  with_tls 
)

Member Function Documentation

◆ cancel()

void server_mock::MySQLServerMockSessionX::cancel ( )
inlineoverridevirtual

◆ encode_due_async_notices()

bool server_mock::MySQLServerMockSessionX::encode_due_async_notices ( const clock_type::time_point &  start_time)

encode all async notices.

Parameters
start_timestart time
Return values
trueone or more notice was added
falseno notice encoded.

◆ finish()

void server_mock::MySQLServerMockSessionX::finish ( )
private

◆ greeting()

void server_mock::MySQLServerMockSessionX::greeting ( )
private

◆ handshake()

void server_mock::MySQLServerMockSessionX::handshake ( )
private

◆ idle()

void server_mock::MySQLServerMockSessionX::idle ( )
private

◆ notice_expiry()

MySQLServerMockSessionX::clock_type::time_point server_mock::MySQLServerMockSessionX::notice_expiry ( ) const

expiry of the notice.

Returns
when the next notice needs to be sent.
Return values
{}if no expiry

◆ notices()

void server_mock::MySQLServerMockSessionX::notices ( )
private

◆ run()

void server_mock::MySQLServerMockSessionX::run ( )
overridevirtual

◆ send_notice_then_notices()

void server_mock::MySQLServerMockSessionX::send_notice_then_notices ( )
private

◆ send_response_then_disconnect()

void server_mock::MySQLServerMockSessionX::send_response_then_disconnect ( )
private

◆ send_response_then_first_idle()

void server_mock::MySQLServerMockSessionX::send_response_then_first_idle ( )
private

◆ send_response_then_handshake()

void server_mock::MySQLServerMockSessionX::send_response_then_handshake ( )
private

◆ send_response_then_idle()

void server_mock::MySQLServerMockSessionX::send_response_then_idle ( )
private

◆ terminate()

void server_mock::MySQLServerMockSessionX::terminate ( )
inlineoverridevirtual

Member Data Documentation

◆ async_notices_

std::vector<AsyncNotice> server_mock::MySQLServerMockSessionX::async_notices_
private

◆ notice_timer_

net::steady_timer server_mock::MySQLServerMockSessionX::notice_timer_ {protocol_.io_context()}
private

◆ protocol_

MySQLXProtocol server_mock::MySQLServerMockSessionX::protocol_
private

◆ start_time_

clock_type::time_point server_mock::MySQLServerMockSessionX::start_time_ {}
private

◆ with_tls_

bool server_mock::MySQLServerMockSessionX::with_tls_ {false}
private

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