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

Function onConnection

examples/fastcgi/fastcgi_test.cc:43–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43void onConnection(const TcpConnectionPtr& conn)
44{
45 if (conn->connected())
46 {
47 typedef std::shared_ptr<FastCgiCodec> CodecPtr;
48 CodecPtr codec(new FastCgiCodec(onRequest));
49 conn->setContext(codec);
50 conn->setMessageCallback(
51 std::bind(&FastCgiCodec::onMessage, codec, _1, _2, _3));
52 conn->setTcpNoDelay(true);
53 }
54}
55
56int main(int argc, char* argv[])
57{

Callers

nothing calls this directly

Calls 4

connectedMethod · 0.45
setContextMethod · 0.45
setMessageCallbackMethod · 0.45
setTcpNoDelayMethod · 0.45

Tested by

no test coverage detected