acl/lib_acl_cpp/include/acl_cpp/connpool/connect_client.hpp

40 lines
549 B
C++
Raw Normal View History

#pragma once
2013-08-27 22:04:32 +08:00
#include "acl_cpp/acl_cpp_define.hpp"
namespace acl
{
2013-08-27 22:04:32 +08:00
class ACL_CPP_API connect_client
{
public:
connect_client() : when_(0) {}
virtual ~connect_client() {}
/**
* <EFBFBD><EFBFBD><EFBFBD>ø<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD>α<EFBFBD>ʹ<EFBFBD>õ<EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @return {time_t}
*/
time_t get_when()
{
return when_;
}
/**
* <EFBFBD><EFBFBD><EFBFBD>ø<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD>ʹ<EFBFBD>õ<EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
void set_when(time_t when)
{
when_ = when;
}
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD>ִ˺<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @return {bool} <EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӳɹ<EFBFBD>
*/
virtual bool open() = 0;
private:
time_t when_;
};
} // namespace acl