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

Method onConnection

examples/simple/echo/echo.cc:27–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27void EchoServer::onConnection(const muduo::net::TcpConnectionPtr& conn)
28{
29 LOG_INFO << "EchoServer - " << conn->peerAddress().toIpPort() << " -> "
30 << conn->localAddress().toIpPort() << " is "
31 << (conn->connected() ? "UP" : "DOWN");
32}
33
34void EchoServer::onMessage(const muduo::net::TcpConnectionPtr& conn,
35 muduo::net::Buffer* buf,

Callers

nothing calls this directly

Calls 2

toIpPortMethod · 0.45
connectedMethod · 0.45

Tested by

no test coverage detected