MySQL 8.0.40
Source Code Documentation
Named_pipe_listener Class Reference

This class abstracts Named pipe listener that setups a named pipe handle to listen and receive client connections. More...

#include <named_pipe_connection.h>

Public Member Functions

 Named_pipe_listener (const std::string *pipe_name)
 Constructor for named pipe listener. More...
 
bool setup_listener ()
 Set up a listener. More...
 
Channel_infolisten_for_connection_event ()
 The body of the event loop that listen for connection events from clients. More...
 
bool update_named_pipe_full_access_group (const char *new_group_name)
 Set the Windows group name whose users have full access to new instances of the named pipe. More...
 
bool check_and_spawn_admin_connection_handler_thread () const
 Spawn admin connection handler thread if separate thread is required to accept admin connections. More...
 
void close_listener ()
 Close the listener. More...
 

Private Attributes

std::string m_pipe_name
 
SECURITY_ATTRIBUTES * mp_sa_pipe_security
 
HANDLE m_pipe_handle
 
char m_pipe_path_name [512]
 
HANDLE h_connected_pipe
 
OVERLAPPED m_connect_overlapped
 

Detailed Description

This class abstracts Named pipe listener that setups a named pipe handle to listen and receive client connections.

Constructor & Destructor Documentation

◆ Named_pipe_listener()

Named_pipe_listener::Named_pipe_listener ( const std::string *  pipe_name)
inline

Constructor for named pipe listener.

Parameters
pipe_namename for pipe used in CreateNamedPipe function.

Member Function Documentation

◆ check_and_spawn_admin_connection_handler_thread()

bool Named_pipe_listener::check_and_spawn_admin_connection_handler_thread ( ) const
inline

Spawn admin connection handler thread if separate thread is required to accept admin connections.

Currently we do not support named pipe admin connections. Hence this method is noop.

TODO: Implement when admin connections via named pipe is to be supported.

Returns
false as the method is a NOOP.

◆ close_listener()

void Named_pipe_listener::close_listener ( )

Close the listener.

◆ listen_for_connection_event()

Channel_info * Named_pipe_listener::listen_for_connection_event ( )

The body of the event loop that listen for connection events from clients.

Return values
Channel_infoChannel_info object abstracting the connected client details for processing this connection.

◆ setup_listener()

bool Named_pipe_listener::setup_listener ( )

Set up a listener.

Return values
falselistener listener has been setup successfully to listen for connect events true failure in setting up the listener.

◆ update_named_pipe_full_access_group()

bool Named_pipe_listener::update_named_pipe_full_access_group ( const char *  new_group_name)

Set the Windows group name whose users have full access to new instances of the named pipe.

Return values
falseaccess set successfully. true failed to change access.

Member Data Documentation

◆ h_connected_pipe

HANDLE Named_pipe_listener::h_connected_pipe
private

◆ m_connect_overlapped

OVERLAPPED Named_pipe_listener::m_connect_overlapped
private

◆ m_pipe_handle

HANDLE Named_pipe_listener::m_pipe_handle
private

◆ m_pipe_name

std::string Named_pipe_listener::m_pipe_name
private

◆ m_pipe_path_name

char Named_pipe_listener::m_pipe_path_name[512]
private

◆ mp_sa_pipe_security

SECURITY_ATTRIBUTES* Named_pipe_listener::mp_sa_pipe_security
private

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