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

Method on_accept

lib_acl_cpp/src/db/db_service.cpp:196–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194}
195
196void db_service::on_accept(acl::aio_socket_stream* client)
197{
198 ACL_SOCKET fd = client->get_socket();
199 // �ڴ˴����÷���˽��յ����׽ӿڵ� SO_LINGER ѡ�
200 // �Ա�֤���׽ӿڹرպ�����Դ�ܵõ������ͷţ���Ȼһ��
201 // �������ô�ѡ�����Σ���������ǵ������ֻ�н��յ�
202 // �����Ŀͻ������ݺ�Ż���ùرղ���������Ӧ�ò���
203 // ������ݷ��Ͳ�ȫ�����⣬�мǣ���Ӧ�ڿͻ��˵Ĺر�
204 // ���������� SO_LINGER ѡ��Է�����δ��������
205 // �ڷ�������ý������ӵ� SO_LINGER ѡ������ڲ���
206 // ϵͳ���ٻ����׽ӿ���Դ
207 acl_tcp_so_linger(fd, 1, 0);
208
209 ipc_client* ipc = NEW db_ipc(this, magic_);
210 ipc->open(client);
211
212 // ���ӷ����̵߳���Ϣ����
213
214 ipc->append_message(DB_OK);
215 ipc->append_message(DB_ERR_OPEN);
216 ipc->append_message(DB_ERR_EXEC_SQL);
217
218 // �첽�ȴ���Ϣ
219 ipc->wait();
220}
221
222#ifdef ACL_WINDOWS
223

Callers

nothing calls this directly

Calls 6

acl_tcp_so_lingerFunction · 0.85
db_ipcClass · 0.85
get_socketMethod · 0.80
append_messageMethod · 0.80
openMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected