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

30 lines
780 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();
2022-08-26 17:51:41 +08:00
void accept_gzip(bool yes);
2019-12-20 15:08:36 +08:00
void set_ssl_conf(acl::sslbase_conf* conf);
2022-08-26 17:51:41 +08:00
void set_show_body(bool yes);
2014-11-19 00:25:21 +08:00
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>ʽ
2022-08-26 17:51:41 +08:00
bool accept_gzip_; // <20>Ƿ<EFBFBD>֧<EFBFBD><D6A7>ѹ<EFBFBD><D1B9>
int count_; // IO <20><EFBFBD><E1BBB0><EFBFBD><EFBFBD>
int length_; // ÿ<><C3BF> IO <20><><EFBFBD><EFBFBD><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD>
2022-08-26 17:51:41 +08:00
bool show_body_; // <20>Ƿ<EFBFBD><C7B7><EFBFBD>ʾ<EFBFBD>յ<EFBFBD><D5B5><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2019-12-20 15:08:36 +08:00
acl::sslbase_conf* ssl_conf_;
2014-11-19 00:25:21 +08:00
bool connect_server(acl::http_client& client);
int http_request(int count);
};