Exemplo n.º 1
0
	void Start()
	{
		using namespace std::tr1::placeholders;

		acceptor_.AsyncAccept(0, std::tr1::bind(
			&Server::_OnAccept, this, _1, _2));
	}
Exemplo n.º 2
0
		void Start(const OnReadCallback &readCallback)
		{	
			readCallback_ = readCallback;

			using namespace std::tr1::placeholders;
			try
			{
				acceptor_.AsyncAccept(0, std::tr1::bind(&StateMgr::_AcceptImpl, this, _1, _2));
			}
			catch(std::exception &e)
			{
				::OutputDebugStringA(e.what());
			}
			
		}