MySQL 8.3.0
Source Code Documentation
Channel_info_tcpip_socket Class Reference

This class abstracts the info. More...

Inheritance diagram for Channel_info_tcpip_socket:
[legend]

Public Member Functions

 Channel_info_tcpip_socket (MYSQL_SOCKET connect_socket, bool is_admin_conn)
 Constructor that sets the connect socket. More...
 
THDcreate_thd () override
 Instantiate and initialize THD object and vio. More...
 
void send_error_and_close_channel (uint errorcode, int error, bool senderror) override
 Send error back to the client and close the channel. More...
 
bool is_admin_connection () const override
 
void set_network_namespace (const std::string &network_namespace)
 Set a network namespace for channel. More...
 
- Public Member Functions inherited from Channel_info
virtual ~Channel_info ()=default
 
ulonglong get_prior_thr_create_utime () const
 
void set_prior_thr_create_utime ()
 

Protected Member Functions

Viocreate_and_init_vio () const override
 Create and initialize a Vio object. More...
 
- Protected Member Functions inherited from Channel_info
 Channel_info ()
 

Private Attributes

MYSQL_SOCKET m_connect_sock
 
bool m_is_admin_conn
 
std::string m_network_namespace
 

Detailed Description

This class abstracts the info.

about TCP/IP socket mode of communication with the server.

Constructor & Destructor Documentation

◆ Channel_info_tcpip_socket()

Channel_info_tcpip_socket::Channel_info_tcpip_socket ( MYSQL_SOCKET  connect_socket,
bool  is_admin_conn 
)
inline

Constructor that sets the connect socket.

Parameters
connect_socketset connect socket descriptor.
is_admin_connflag specifying whether a connection is admin connection.

Member Function Documentation

◆ create_and_init_vio()

Vio * Channel_info_tcpip_socket::create_and_init_vio ( ) const
inlineoverrideprotectedvirtual

Create and initialize a Vio object.

Returns
a pointer to the initialized a vio object.

Implements Channel_info.

◆ create_thd()

THD * Channel_info_tcpip_socket::create_thd ( )
inlineoverridevirtual

Instantiate and initialize THD object and vio.

Returns
pointer to initialized THD object.
Return values
NULLTHD object allocation fails.

Reimplemented from Channel_info.

◆ is_admin_connection()

bool Channel_info_tcpip_socket::is_admin_connection ( ) const
inlineoverridevirtual

Reimplemented from Channel_info.

◆ send_error_and_close_channel()

void Channel_info_tcpip_socket::send_error_and_close_channel ( uint  errorcode,
int  error,
bool  senderror 
)
inlineoverridevirtual

Send error back to the client and close the channel.

Parameters
errorcodecode indicating type of error.
erroroperating system specific error code.
senderrortrue if the error need to be sent to client else false.

Reimplemented from Channel_info.

◆ set_network_namespace()

void Channel_info_tcpip_socket::set_network_namespace ( const std::string &  network_namespace)
inline

Set a network namespace for channel.

Parameters
network_namespaceNetwork namespace associated with a channel.

Member Data Documentation

◆ m_connect_sock

MYSQL_SOCKET Channel_info_tcpip_socket::m_connect_sock
private

◆ m_is_admin_conn

bool Channel_info_tcpip_socket::m_is_admin_conn
private

◆ m_network_namespace

std::string Channel_info_tcpip_socket::m_network_namespace
private

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