#include <listen_tcp.h>
Public Types | |
typedef std::pair< const std::string, const std::string > | map_key |
typedef std::map< const map_key, plugin::Plugin * > | map |
typedef std::vector< Plugin * > | vector |
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 |
std::vector< ListenCounter * > & | getListenCounters () |
virtual plugin::Client * | getClient (int fd)=0 |
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 |
Static Public Member Functions | |
static ListenVector & | getListenProtocols () |
static plugin::Client * | getClient () |
static bool | addPlugin (Listen *) |
static void | removePlugin (Listen *) |
static bool | setup (void) |
static plugin::Client * | getNullClient () |
static void | shutdown () |
Protected Member Functions | |
int | acceptTcp (int fd) |
Protected Attributes | |
uint32_t | accept_error_count |
std::vector< ListenCounter * > | counters |
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.
|
protected |
Accept new TCP connection. This is provided to be used in getClient for derived class implementations.
[in] | fd | File descriptor that had activity. |
Newly | accepted file descriptor. |
Definition at line 40 of file listen_tcp.cc.
References accept_error_count.
|
staticinherited |
|
pure virtualinherited |
This provides a new Client object that can be used by a Session.
[in] | fd | File descriptor that had activity. |
Implemented in drizzle_plugin::ListenMySQLProtocol, drizzle_plugin::mysql_unix_socket_protocol::Protocol, and drizzle_plugin::drizzle_protocol::ListenDrizzleProtocol.
|
staticinherited |
|
virtual |
This will bind the port to the host interfaces. [out] Vector of file descriptors that were bound.
true | on 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.
|
virtual |
Get the host address to bind to.
The | host address. |
Reimplemented in drizzle_plugin::ListenMySQLProtocol.
Definition at line 200 of file listen_tcp.cc.
|
staticinherited |
|
pure virtual |
Get the port to bind to.
The | port number. |
Implemented in drizzle_plugin::ListenMySQLProtocol, drizzle_plugin::mysql_unix_socket_protocol::Protocol, and drizzle_plugin::drizzle_protocol::ListenDrizzleProtocol.
|
staticinherited |
|
staticinherited |
Setup all configured listen plugins.
Definition at line 60 of file listen.cc.
References drizzled::plugin::Listen::getFileDescriptors().
|
staticinherited |
|
protected |
Count of errors encountered in acceptTcp.
Definition at line 37 of file listen_tcp.h.
Referenced by acceptTcp().