Example #1
0
	void forward_moudle::connection_notify(int type, connection_ptr connection, connection_manager&)
	{
		try
		{
			if (type != 0)
			{
				// 从 routing table 里删掉这个连接.
				std::string username = boost::any_cast<std::string>(connection->retrive_module_private("username"));
				m_routing_table.erase(username);
			}
		}
		catch (const boost::bad_any_cast&)
		{
		}
	}