| 194 | } |
| 195 | |
| 196 | void 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 |
nothing calls this directly
no test coverage detected