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

Method onConnection

examples/protobuf/resolver/client.cc:42–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40
41 private:
42 void onConnection(const TcpConnectionPtr& conn)
43 {
44 if (conn->connected())
45 {
46 //channel_.reset(new RpcChannel(conn));
47 channel_->setConnection(conn);
48 total_ = 4;
49 resolve("www.example.com");
50 resolve("www.chenshuo.com");
51 resolve("www.google.com");
52 resolve("acme.chenshuo.org");
53 }
54 else
55 {
56 loop_->quit();
57 }
58 }
59
60 void resolve(const std::string& host)
61 {

Callers

nothing calls this directly

Calls 4

resolveFunction · 0.85
setConnectionMethod · 0.80
connectedMethod · 0.45
quitMethod · 0.45

Tested by

no test coverage detected