MCPcopy Create free account
hub / github.com/acl-dev/acl / handle_client

Method handle_client

lib_acl_cpp/samples/aio/server_timer/main.cpp:184–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182
183private:
184 bool handle_client(acl::aio_socket_stream* client) {
185 // �����첽�ͻ������Ļص���������첽�����а�
186 io_callback* callback = new io_callback(client);
187
188 // ע���첽���Ķ��ص�����
189 client->add_read_callback(callback);
190
191 // ע���첽����д�ص�����
192 client->add_write_callback(callback);
193
194 // ע���첽���Ĺرջص�����
195 client->add_close_callback(callback);
196
197 // ע���첽���ij�ʱ�ص�����
198 client->add_timeout_callback(callback);
199
200 // ���޶�����������󳤶�ʱ
201 if (__max > 0) {
202 client->set_buf_max(__max);
203 }
204
205 // ���첽����һ������
206 client->gets(__timeout, false);
207 return true;
208 }
209};
210
211class mytimer : public acl::aio_timer_callback

Callers

nothing calls this directly

Calls 5

add_read_callbackMethod · 0.80
add_write_callbackMethod · 0.80
add_close_callbackMethod · 0.80
add_timeout_callbackMethod · 0.80
getsMethod · 0.80

Tested by

no test coverage detected