acl/lib_acl_cpp/samples/connect_manager/connect_pool.h

22 lines
422 B
C
Raw Normal View History

#pragma once
2014-11-19 00:25:21 +08:00
class connect_pool : public acl::connect_pool
{
public:
connect_pool(const char* addr, size_t count, size_t idx);
2014-11-19 00:25:21 +08:00
virtual ~connect_pool();
void set_timeout(int conn_timeout, int rw_timeout);
protected:
// 基类纯虚函数的实现
acl::connect_client* create_connect();
2014-11-19 00:25:21 +08:00
private:
acl::string addr_;
2015-12-12 23:00:03 +08:00
size_t count_;
2014-11-19 00:25:21 +08:00
size_t idx_;
int conn_timeout_;
int rw_timeout_;
};