2014-11-19 00:25:21 +08:00
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
class connect_pool : public acl::connect_pool
|
|
|
|
|
{
|
|
|
|
|
public:
|
2015-08-14 17:28:30 +08:00
|
|
|
|
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:
|
2015-08-14 17:28:30 +08:00
|
|
|
|
// <20><><EFBFBD>ി<EFBFBD>麯<EFBFBD><E9BAAF><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5>
|
|
|
|
|
acl::connect_client* create_connect();
|
2014-11-19 00:25:21 +08:00
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
acl::string addr_;
|
|
|
|
|
int count_;
|
|
|
|
|
size_t idx_;
|
|
|
|
|
int conn_timeout_;
|
|
|
|
|
int rw_timeout_;
|
|
|
|
|
};
|