示例#1
0
	http::Buffer PLControl::_DownLoadPl(const stdex::tString &plUrl)
	{
		using namespace std::tr1::placeholders;

		http::Buffer buf;
		
		try
		{
			if( plUrl.empty() )
				throw std::runtime_error("PL url 为空");

			Log(LM_DEBUG, plUrl);
			buf = http::DownloadFile2(plUrl,
				std::tr1::bind(&PLControl::_DownloadFileCallback, this));
		}
		catch(std::exception &e)
		{
			std::string error = "下载PL文件失败: ";
			error += e.what();

			throw std::runtime_error(error);
		}

		return buf;
	}