~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/listen.cc

  • Committer: Andrew Hutchings
  • Date: 2011-01-31 14:35:57 UTC
  • mto: (2136.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 2137.
  • Revision ID: andrew@linuxjedi.co.uk-20110131143557-ul09gpvfwhx0p0nt
Add protocol counters table

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
namespace drizzled
34
34
{
 
35
namespace plugin
 
36
{
35
37
 
36
 
std::vector<plugin::Listen *> listen_list;
 
38
static std::vector<plugin::Listen *> listen_list;
37
39
std::vector<plugin::Listen *> listen_fd_list;
38
40
std::vector<pollfd> fd_list;
39
41
uint32_t fd_count= 0;
40
42
int wakeup_pipe[2];
41
43
 
42
 
bool plugin::Listen::addPlugin(plugin::Listen *listen_obj)
 
44
ListenVector &Listen::getListenProtocols()
 
45
{
 
46
  return listen_list;
 
47
}
 
48
 
 
49
bool Listen::addPlugin(plugin::Listen *listen_obj)
43
50
{
44
51
  listen_list.push_back(listen_obj);
45
52
  return false;
46
53
}
47
54
 
48
 
void plugin::Listen::removePlugin(plugin::Listen *listen_obj)
 
55
void Listen::removePlugin(plugin::Listen *listen_obj)
49
56
{
50
57
  listen_list.erase(std::remove(listen_list.begin(),
51
58
                                listen_list.end(),
53
60
                    listen_list.end());
54
61
}
55
62
 
56
 
bool plugin::Listen::setup(void)
 
63
bool Listen::setup(void)
57
64
{
58
65
  std::vector<plugin::Listen *>::iterator it;
59
66
 
105
112
  return false;
106
113
}
107
114
 
108
 
plugin::Client *plugin::Listen::getClient(void)
 
115
Client *plugin::Listen::getClient(void)
109
116
{
110
117
  int ready;
111
118
  plugin::Client *client;
156
163
  }
157
164
}
158
165
 
159
 
plugin::Client *plugin::Listen::getNullClient(void)
 
166
Client *plugin::Listen::getNullClient(void)
160
167
{
161
168
  return new plugin::NullClient();
162
169
}
163
170
 
164
 
void plugin::Listen::shutdown(void)
 
171
void Listen::shutdown(void)
165
172
{
166
173
  ssize_t ret= write(wakeup_pipe[1], "\0", 1);
167
174
  assert(ret == 1);
168
175
}
169
176
 
 
177
 
 
178
} /* namespace plugin */
170
179
} /* namespace drizzled */