Exemple #1
0
	virtual void handleConnection(TCPConnectionPtr& tcp_conn)
	{
		static const std::string HELLO_MESSAGE("Hello there!\x0D\x0A");
		tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_CLOSE);	// make sure it will get closed
		tcp_conn->async_write(boost::asio::buffer(HELLO_MESSAGE),
							  boost::bind(&TCPConnection::finish, tcp_conn));
	}