完善httpclientpool
This commit is contained in:
parent
3e8beea319
commit
d5d9f92e67
@ -300,7 +300,7 @@ namespace f8
|
||||
std::vector<HttpThread*> http_thread_pool;
|
||||
};
|
||||
|
||||
void HttpClientPool::Init()
|
||||
void HttpClientPool::Init(int thread_num)
|
||||
{
|
||||
impl_ = new HttpClientPoolImpl();
|
||||
impl_->Init();
|
||||
@ -317,6 +317,7 @@ namespace f8
|
||||
}
|
||||
}
|
||||
);
|
||||
impl_->SetThreadNum(thread_num);
|
||||
}
|
||||
|
||||
void HttpClientPool::UnInit()
|
||||
@ -325,11 +326,6 @@ namespace f8
|
||||
impl_ = nullptr;
|
||||
}
|
||||
|
||||
void HttpClientPool::SetThreadNum(int thread_num)
|
||||
{
|
||||
impl_->SetThreadNum(thread_num);
|
||||
}
|
||||
|
||||
void HttpClientPool::HttpGet(a8::XParams param, AsyncHttpOnOkFunc on_ok, AsyncHttpOnErrorFunc on_error,
|
||||
const char* url, a8::XObject url_params,
|
||||
long long hash_code, a8::XObject* headers)
|
||||
|
@ -14,9 +14,8 @@ namespace f8
|
||||
friend class a8::Singleton<HttpClientPool>;
|
||||
|
||||
public:
|
||||
void Init();
|
||||
void Init(int thread_num);
|
||||
void UnInit();
|
||||
void SetThreadNum(int thread_num);
|
||||
|
||||
//执行异步http get
|
||||
void HttpGet(a8::XParams param, AsyncHttpOnOkFunc on_ok, AsyncHttpOnErrorFunc on_error,
|
||||
|
Loading…
x
Reference in New Issue
Block a user