#include <http_request_manager.hpp>
|
| http_request_manager () |
|
virtual | ~http_request_manager () |
|
void | set_ssl (sslbase_conf *ssl_conf) |
|
| connect_manager (void) |
|
virtual | ~connect_manager (void) |
|
void | bind_thread (bool yes) |
|
void | init (const char *default_addr, const char *addr_list, size_t count, int conn_timeout=30, int rw_timeout=30) |
|
void | set (const char *addr, size_t count, int conn_timeout=30, int rw_timeout=30) |
|
const conn_config * | get_config (const char *addr, bool use_first=false) |
|
void | set_retry_inter (int n) |
|
void | set_idle_ttl (time_t ttl) |
|
void | set_check_inter (int n) |
|
void | remove (const char *addr) |
|
connect_pool * | get (const char *addr, bool exclusive=true, bool restore=false) |
|
virtual connect_pool * | peek (void) |
|
virtual connect_pool * | peek (const char *key, bool exclusive=true) |
|
void | lock (void) |
|
void | unlock (void) |
|
std::vector< connect_pool * > & | get_pools (void) |
|
size_t | check_idle (size_t step, size_t *left=NULL) |
|
size_t | size (void) const |
|
connect_pool * | get_default_pool (void) |
|
void | statistics (void) |
|
bool | start_monitor (connect_monitor *monitor) |
|
connect_monitor * | stop_monitor (bool graceful=true) |
|
void | set_pools_status (const char *addr, bool alive) |
|
|
connect_pool * | create_pool (const char *addr, size_t count, size_t idx) |
|
void | set_service_list (const char *addr_list, int count, int conn_timeout, int rw_timeout) |
|
conns_pools & | get_pools_by_id (unsigned long id) |
|
connect_pool * | create_pool (const conn_config &cf, size_t idx) |
|
void | create_pools_for (pools_t &pools) |
|
void | remove (pools_t &pools, const char *addr) |
|
void | set_status (pools_t &pools, const char *addr, bool alive) |
|
unsigned long | get_id (void) const |
|
void | get_key (const char *addr, string &key) |
|
void | get_addr (const char *key, string &addr) |
|
connect_pool * | add_pool (const char *addr) |
|
| noncopyable () |
|
| ~noncopyable () |
|
HTTP 客户端请求连接池管理类
在文件 http_request_manager.hpp 第 13 行定义.
◆ http_request_manager()
acl::http_request_manager::http_request_manager |
( |
| ) |
|
◆ ~http_request_manager()
virtual acl::http_request_manager::~http_request_manager |
( |
| ) |
|
|
virtual |
◆ create_pool()
connect_pool* acl::http_request_manager::create_pool |
( |
const char * |
addr, |
|
|
size_t |
count, |
|
|
size_t |
idx |
|
) |
| |
|
protectedvirtual |
基类纯虚函数,用来创建连接池对象,该函数返回后由基类设置连接池的 网络连接及网络 IO 的超时时间
- 参数
-
addr | {const char*} 服务器监听地址,格式:ip:port |
count | {size_t} 连接池的大小限制,当该值为 0 时则没有限制 |
idx | {size_t} 该连接池对象在集合中的下标位置(从 0 开始) |
- 返回
- {connect_pool*} 返回创建的连接池对象
实现了 acl::connect_manager.
◆ set_ssl()
void acl::http_request_manager::set_ssl |
( |
sslbase_conf * |
ssl_conf | ) |
|
该类的文档由以下文件生成: