#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 > &fds) |
virtual const std::string | getHost (void) const |
virtual in_port_t | getPort (void) 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 (void) |
static bool | addPlugin (Listen *listen_obj) |
static void | removePlugin (Listen *listen_obj) |
static bool | setup (void) |
static plugin::Client * | getNullClient (void) |
static void | shutdown (void) |
Protected Member Functions | |
int | acceptTcp (int fd) |
Protected Attributes | |
uint32_t | accept_error_count |
std::vector< ListenCounter * > | counters |
Private Member Functions | |
ListenTcp (const ListenTcp &) | |
ListenTcp & | operator= (const ListenTcp &) |
This class is used by client plugins to provide and manage TCP listening interfaces for new client instances.
Definition at line 37 of file listen_tcp.h.
int drizzled::plugin::ListenTcp::acceptTcp | ( | int | fd | ) | [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 43 of file listen_tcp.cc.
References accept_error_count.
bool drizzled::plugin::Listen::addPlugin | ( | plugin::Listen * | listen_obj | ) | [static, inherited] |
virtual plugin::Client* drizzled::plugin::Listen::getClient | ( | int | fd | ) | [pure virtual, inherited] |
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.
Client * drizzled::plugin::Listen::getClient | ( | void | ) | [static, inherited] |
bool drizzled::plugin::ListenTcp::getFileDescriptors | ( | std::vector< int > & | fds | ) | [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 71 of file listen_tcp.cc.
const std::string drizzled::plugin::ListenTcp::getHost | ( | void | ) | const [virtual] |
Get the host address to bind to.
The | host address. |
Reimplemented in drizzle_plugin::ListenMySQLProtocol.
Definition at line 216 of file listen_tcp.cc.
Client * drizzled::plugin::Listen::getNullClient | ( | void | ) | [static, inherited] |
virtual in_port_t drizzled::plugin::ListenTcp::getPort | ( | void | ) | const [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.
void drizzled::plugin::Listen::removePlugin | ( | plugin::Listen * | listen_obj | ) | [static, inherited] |
bool drizzled::plugin::Listen::setup | ( | void | ) | [static, inherited] |
void drizzled::plugin::Listen::shutdown | ( | void | ) | [static, inherited] |
uint32_t drizzled::plugin::ListenTcp::accept_error_count [protected] |
Count of errors encountered in acceptTcp.
Definition at line 44 of file listen_tcp.h.
Referenced by acceptTcp().