acl/lib_acl_cpp/samples/ssl/https_client/https_client.h

26 lines
634 B
C
Raw Normal View History

#pragma once
2014-11-19 00:25:21 +08:00
class https_client : public acl::thread
{
public:
https_client(const char* server_addr, const char* domain,
bool keep_alive, int count, int length);
~https_client();
void set_ssl_conf(acl::polarssl_conf* conf);
protected:
virtual void* run(); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E9BAAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߳<EFBFBD><DFB3>б<EFBFBD><D0B1><EFBFBD><EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
private:
acl::string server_addr_; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ
acl::string domain_; // <20><><EFBFBD><EFBFBD>
bool keep_alive_; // <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>ó<EFBFBD><C3B3><EFBFBD><EFBFBD>ӷ<EFBFBD>ʽ
int count_; // IO <20><EFBFBD><E1BBB0><EFBFBD><EFBFBD>
int length_; // ÿ<><C3BF> IO <20><><EFBFBD><EFBFBD><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD>
2014-11-19 00:25:21 +08:00
acl::polarssl_conf* ssl_conf_;
bool connect_server(acl::http_client& client);
int http_request(int count);
};