| 19 | { |
| 20 | public: |
| 21 | RpcClient(EventLoop* loop, const InetAddress& serverAddr) |
| 22 | : loop_(loop), |
| 23 | client_(loop, serverAddr, "RpcClient"), |
| 24 | channel_(new RpcChannel), |
| 25 | got_(0), |
| 26 | total_(0), |
| 27 | stub_(get_pointer(channel_)) |
| 28 | { |
| 29 | client_.setConnectionCallback( |
| 30 | std::bind(&RpcClient::onConnection, this, _1)); |
| 31 | client_.setMessageCallback( |
| 32 | std::bind(&RpcChannel::onMessage, get_pointer(channel_), _1, _2, _3)); |
| 33 | // client_.enableRetry(); |
| 34 | } |
| 35 | |
| 36 | void connect() |
| 37 | { |
nothing calls this directly
no test coverage detected