drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
drizzled::plugin::ListenTcp Class Referenceabstract

#include <listen_tcp.h>

Inheritance diagram for drizzled::plugin::ListenTcp:
[legend]
Collaboration diagram for drizzled::plugin::ListenTcp:
[legend]

Public Member Functions

 ListenTcp (std::string name_arg)
virtual bool getFileDescriptors (std::vector< int > &)
virtual const std::string getHost () const
virtual in_port_t getPort () const =0
Public Member Functions inherited from drizzled::plugin::Listen
 Listen (std::string name_arg)
std::vector< ListenCounter * > & getListenCounters ()
virtual plugin::Client * getClient (int fd)=0
Public Member Functions inherited from drizzled::plugin::Plugin
 Plugin (const std::string &name, const std::string &type_name)
virtual void shutdownPlugin ()
virtual void prime ()
virtual void startup (drizzled::Session &)
void activate ()
void deactivate ()
bool isActive () const
const std::string & getName () const
void setModule (module::Module *module)
const std::string & getTypeName () const
virtual bool removeLast () const
const std::string & getModuleName () const

Protected Member Functions

int acceptTcp (int fd)

Protected Attributes

uint32_t accept_error_count
Protected Attributes inherited from drizzled::plugin::Listen
std::vector< ListenCounter * > counters

Additional Inherited Members

Public Types inherited from drizzled::plugin::Plugin
typedef std::pair< const std::string, const std::string > map_key
typedef std::unique_ptr< plugin::Plugin, deleter_fn > owned_ptr
typedef std::map< const map_key, owned_ptr > map
typedef std::vector< Plugin * > vector
Static Public Member Functions inherited from drizzled::plugin::Listen
static ListenVector & getListenProtocols ()
static bool addPlugin (Listen &)
static void removePlugin (Listen &)
static bool setup (void)
static plugin::Client * serveConnections ()
static plugin::Client * getNullClient ()
static void shutdown ()

Detailed Description

This class is used by client plugins to provide and manage TCP listening interfaces for new client instances.

Definition at line 33 of file listen_tcp.h.

Constructor & Destructor Documentation

◆ ListenTcp()

drizzled::plugin::ListenTcp::ListenTcp ( std::string name_arg)
inline

Definition at line 48 of file listen_tcp.h.

Member Function Documentation

◆ acceptTcp()

int drizzled::plugin::ListenTcp::acceptTcp ( int fd)
protected

Accept new TCP connection. This is provided to be used in getClient for derived class implementations.

Parameters
[in]fdFile descriptor that had activity.
Return values
Newlyaccepted file descriptor.

Definition at line 40 of file listen_tcp.cc.

◆ getFileDescriptors()

bool drizzled::plugin::ListenTcp::getFileDescriptors ( std::vector< int > & fds)
virtual

This will bind the port to the host interfaces. @fds[out] Vector of file descriptors that were bound.

Return values
trueon failure, false on success.

Implements drizzled::plugin::Listen.

Reimplemented in drizzle_plugin::mysql_unix_socket_protocol::Protocol.

Definition at line 59 of file listen_tcp.cc.

◆ getHost()

const std::string drizzled::plugin::ListenTcp::getHost ( ) const
virtual

Get the host address to bind to.

Return values
Thehost address.

Reimplemented in drizzle_plugin::ListenMySQLProtocol.

Definition at line 242 of file listen_tcp.cc.

◆ getPort()

virtual in_port_t drizzled::plugin::ListenTcp::getPort ( ) const
pure virtual

Member Data Documentation

◆ accept_error_count

uint32_t drizzled::plugin::ListenTcp::accept_error_count
protected

Count of errors encountered in acceptTcp.

Definition at line 37 of file listen_tcp.h.


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