| 41 | } |
| 42 | |
| 43 | void 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 | |
| 56 | int main(int argc, char* argv[]) |
| 57 | { |
nothing calls this directly
no test coverage detected