acl/lib_acl_cpp/samples/http_server/http_rpc.h

32 lines
858 B
C
Raw Normal View History

#pragma once
2014-11-19 00:25:21 +08:00
#include "acl_cpp/ipc/rpc.hpp"
#include "acl_cpp/stream/aio_socket_stream.hpp"
#include "acl_cpp/stream/socket_stream.hpp"
//class acl::aio_socket_stream;
//class acl::socket_stream;
class http_rpc : public acl::rpc_request
{
public:
http_rpc(acl::aio_socket_stream* client, unsigned buf_size);
~http_rpc();
protected:
// <20><><EFBFBD>̴߳<DFB3><CCB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
virtual void rpc_run();
// <20><><EFBFBD>̴߳<DFB3><CCB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̣<EFBFBD><CCA3>յ<EFBFBD><D5B5><EFBFBD><EFBFBD>߳<EFBFBD><DFB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɵ<EFBFBD><C9B5><EFBFBD>Ϣ
2014-11-19 00:25:21 +08:00
virtual void rpc_onover();
private:
bool proc_quit_; // <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD>˳<EFBFBD>
acl::aio_handle& handle_; // <20><EFBFBD><ECB2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
acl::aio_socket_stream* client_; // <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
bool keep_alive_; // <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>ͻ<EFBFBD><CDBB>˱<EFBFBD><CBB1>ֳ<EFBFBD><D6B3><EFBFBD><EFBFBD><EFBFBD>
char* res_buf_; // <20><><EFBFBD>ŷ<EFBFBD><C5B7>ظ<EFBFBD><D8B8>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݵĻ<DDB5><C4BB><EFBFBD><EFBFBD><EFBFBD>
unsigned buf_size_; // res_buf_ <20>Ŀռ<C4BF><D5BC><EFBFBD>С
2014-11-19 00:25:21 +08:00
// <20><><EFBFBD><EFBFBD><EFBFBD>߳<EFBFBD><DFB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
void handle_conn(acl::socket_stream* stream);
};