2014-11-19 00:25:21 +08:00
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
class http_job : public acl::thread_job
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
http_job(acl::thread_pool& thrpool, const char* url,
|
|
|
|
|
const char* dns_ip, int dns_port);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
// Ҫ<><D2AA><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƕ<EFBFBD>̬<EFBFBD><CCAC><EFBFBD><EFBFBD>
|
|
|
|
|
~http_job();
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
// <20><><EFBFBD>ി<EFBFBD>麯<EFBFBD><E9BAAF>
|
|
|
|
|
virtual void* run();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
acl::thread_pool& thrpool_;
|
|
|
|
|
acl::string url_;
|
|
|
|
|
acl::string dns_ip_;
|
|
|
|
|
int dns_port_;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
bool dns_lookup(const char* domain, std::vector<acl::string>& ips);
|
|
|
|
|
};
|