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

Method onMessage

examples/netty/echo/server2.cc:59–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57 }
58
59 void onMessage(const TcpConnectionPtr& conn, Buffer* buf, Timestamp)
60 {
61 size_t len = buf->readableBytes();
62 transferredBytes_.addAndGet(len);
63 receivedMessages_.incrementAndGet();
64 conn->send(buf);
65 }
66
67 void printThroughput()
68 {

Callers

nothing calls this directly

Calls 4

readableBytesMethod · 0.80
addAndGetMethod · 0.80
incrementAndGetMethod · 0.80
sendMethod · 0.45

Tested by

no test coverage detected