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

Method onConnection

examples/ace/logging/server.cc:101–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99
100 private:
101 void onConnection(const TcpConnectionPtr& conn)
102 {
103 if (conn->connected())
104 {
105 SessionPtr session(new Session(conn));
106 conn->setContext(session);
107 }
108 else
109 {
110 conn->setContext(SessionPtr());
111 }
112 }
113
114 EventLoop* loop_;
115 TcpServer server_;

Callers

nothing calls this directly

Calls 2

connectedMethod · 0.45
setContextMethod · 0.45

Tested by

no test coverage detected