예제 #1
0
	void Start()
	{
		using namespace std::tr1::placeholders;

		acceptor_.AsyncAccept(0, std::tr1::bind(
			&Server::_OnAccept, this, _1, _2));
	}
예제 #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());
			}
			
		}