mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-12-15 01:10:52 +08:00
5bb7daf807
http_request/http_client add controling parameters
34 lines
529 B
C++
34 lines
529 B
C++
#pragma once
|
|
#include "fiber_cpp_define.hpp"
|
|
|
|
namespace acl {
|
|
|
|
class fiber_waiter;
|
|
class socket_stream;
|
|
|
|
class tcp_keeper : public thread
|
|
{
|
|
public:
|
|
tcp_keeper(void);
|
|
~tcp_keeper(void);
|
|
|
|
tcp_keeper& set_conn_timeout(int n);
|
|
tcp_keeper& set_rw_timeout(int n);
|
|
tcp_keeper& set_conn_max(int n);
|
|
tcp_keeper& set_conn_ttl(int ttl);
|
|
tcp_keeper& set_pool_ttl(int ttl);
|
|
|
|
socket_stream* peek(const char* addr);
|
|
|
|
void stop(void);
|
|
|
|
protected:
|
|
// @override
|
|
void* run(void);
|
|
|
|
private:
|
|
fiber_waiter* waiter_;
|
|
};
|
|
|
|
} // namespace acl
|