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

Method onConnection

examples/netty/echo/server.cc:42–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40
41 private:
42 void onConnection(const TcpConnectionPtr& conn)
43 {
44 LOG_TRACE << conn->peerAddress().toIpPort() << " -> "
45 << conn->localAddress().toIpPort() << " is "
46 << (conn->connected() ? "UP" : "DOWN");
47 conn->setTcpNoDelay(true);
48 }
49
50 void onMessage(const TcpConnectionPtr& conn, Buffer* buf, Timestamp)
51 {

Callers

nothing calls this directly

Calls 3

toIpPortMethod · 0.45
connectedMethod · 0.45
setTcpNoDelayMethod · 0.45

Tested by

no test coverage detected