���� service_.rpc_fork ���� RPC ��������߳��е��ñ����� ��������������ģ�鷢����������Ϣ
| 22 | // ���� service_.rpc_fork ���� RPC ��������߳��е��ñ����� |
| 23 | // ��������������ģ�鷢����������Ϣ |
| 24 | void http_rpc::rpc_run() |
| 25 | { |
| 26 | // ������������ |
| 27 | acl::socket_stream stream; |
| 28 | |
| 29 | // ������ get_vstream() ��õ� ACL_VSTREAM ������������ |
| 30 | // ���� stream ������Ϊ�� acl_cpp �� acl �е������� |
| 31 | // �ͷ����������ն��ǻ��� ACL_VSTREAM���� ACL_VSTREAM �� |
| 32 | // �ڲ�ά������һ����/д�������������ڳ����ӵ����ݴ����У� |
| 33 | // ����ÿ�ν� ACL_VSTREAM ��Ϊ�ڲ����Ļ��������Դ� |
| 34 | ACL_VSTREAM* vstream = client_->get_vstream(); |
| 35 | ACL_VSTREAM_SET_RWTIMO(vstream, 10); |
| 36 | (void) stream.open(vstream); |
| 37 | // ����Ϊ����ģʽ |
| 38 | stream.set_tcp_non_blocking(false); |
| 39 | |
| 40 | rpc_req_add(); |
| 41 | |
| 42 | // ��ʼ������ HTTP ���� |
| 43 | handle_conn(&stream); |
| 44 | |
| 45 | rpc_req_del(); |
| 46 | |
| 47 | // ����Ϊ������ģʽ |
| 48 | stream.set_tcp_non_blocking(true); |
| 49 | |
| 50 | // �� ACL_VSTREAM ���������������������ܱ�֤���ͷ�����������ʱ |
| 51 | // ����ر��������ߵ����ӣ���Ϊ�����ӱ��������ڷ�����������ģ���Ҫ�� |
| 52 | // ���첽���رշ�ʽ���йر� |
| 53 | stream.unbind(); |
| 54 | } |
| 55 | |
| 56 | void http_rpc::handle_conn(acl::socket_stream* stream) |
| 57 | { |
nothing calls this directly
no test coverage detected