24
24
#include <drizzled/plugin/client.h>
26
26
#include "net_serv.h"
29
28
class ListenOldLibdrizzle: public drizzled::plugin::ListenTcp
32
ListenOldLibdrizzle() {}
31
virtual const char* getHost(void) const;
33
32
virtual in_port_t getPort(void) const;
34
33
virtual drizzled::plugin::Client *getClient(int fd);
42
char scramble[SCRAMBLE_LENGTH+1];
47
41
uint32_t client_capabilities;
43
bool checkConnection(void);
48
44
bool netStoreData(const unsigned char *from, size_t length);
51
* Performs handshake with client and authorizes user.
53
* Returns true is the connection is valid and the
54
* user is authorized, otherwise false.
56
bool checkConnection(void);
45
void writeEOFPacket(uint32_t server_status, uint32_t total_warn_count);
59
48
ClientOldLibdrizzle(int fd);
60
~ClientOldLibdrizzle();
61
virtual void setSession(Session *session_arg);
49
virtual ~ClientOldLibdrizzle();
62
51
virtual int getFileDescriptor(void);
63
52
virtual bool isConnected();
64
53
virtual bool isReading(void);
65
54
virtual bool isWriting(void);
68
virtual bool haveError(void);
69
virtual bool haveMoreData(void);
71
virtual void setError(char error);
72
virtual bool wasAborted(void);
55
virtual bool flush(void);
56
virtual void close(void);
73
58
virtual bool authenticate(void);
74
59
virtual bool readCommand(char **packet, uint32_t *packet_length);
75
virtual void sendOK();
76
virtual void sendEOF();
61
virtual void sendOK(void);
62
virtual void sendEOF(void);
77
63
virtual void sendError(uint32_t sql_errno, const char *err);
79
virtual void forceClose();
80
virtual void prepareForResend();
83
65
virtual bool sendFields(List<Item> *list);
90
72
virtual bool store(int64_t from);
91
73
virtual bool store(uint64_t from);
92
74
virtual bool store(double from, uint32_t decimals, String *buffer);
93
virtual bool store(const DRIZZLE_TIME *from);
94
75
virtual bool store(const char *from, size_t length);
77
virtual bool haveError(void);
78
virtual bool haveMoreData(void);
79
virtual bool wasAborted(void);
97
82
#endif /* DRIZZLED_PLUGIN_OLDLIBDRIZZLE_H */