28
28
#include "net_serv.h"
30
namespace drizzle_plugin
33
typedef drizzled::constrained_check<in_port_t, 65535, 0> port_constraint;
34
typedef drizzled::constrained_check<uint32_t, 300, 1> timeout_constraint;
35
typedef drizzled::constrained_check<uint32_t, 300, 1> retry_constraint;
36
typedef drizzled::constrained_check<uint32_t, 1048576, 1024, 1024> buffer_constraint;
30
38
class ListenMySQLProtocol: public drizzled::plugin::ListenTcp
33
bool using_mysql41_protocol;
34
static drizzled::plugin::TableFunction* status_table_function_ptr;
41
const std::string _hostname;
42
bool _using_mysql41_protocol;
37
ListenMySQLProtocol(std::string name_arg, bool using_mysql41_protocol_arg):
38
drizzled::plugin::ListenTcp(name_arg),
39
using_mysql41_protocol(using_mysql41_protocol_arg)
45
ListenMySQLProtocol(std::string name,
46
const std::string &hostname,
47
bool using_mysql41_protocol):
48
drizzled::plugin::ListenTcp(name),
50
_using_mysql41_protocol(using_mysql41_protocol)
41
52
virtual ~ListenMySQLProtocol();
42
virtual const char* getHost(void) const;
53
virtual const std::string getHost(void) const;
43
54
virtual in_port_t getPort(void) const;
44
55
virtual drizzled::plugin::Client *getClient(int fd);
51
62
drizzled::String packet;
52
63
uint32_t client_capabilities;
53
bool using_mysql41_protocol;
64
bool _using_mysql41_protocol;
55
66
bool checkConnection(void);
56
67
bool netStoreData(const unsigned char *from, size_t length);
59
70
void makeScramble(char *scramble);
62
ClientMySQLProtocol(int fd, bool using_mysql41_protocol_arg);
73
ClientMySQLProtocol(int fd, bool _using_mysql41_protocol);
63
74
virtual ~ClientMySQLProtocol();
65
76
static drizzled::atomic<uint64_t> connectionCount;