MCPcopy Create free account
hub / github.com/chenshuo/muduo / RpcClient

Method RpcClient

examples/protobuf/resolver/client.cc:21–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 3

get_pointerFunction · 0.85
setConnectionCallbackMethod · 0.45
setMessageCallbackMethod · 0.45

Tested by

no test coverage detected