本文整理汇总了C++中llcurl::Multi::isValid方法的典型用法代码示例。如果您正苦于以下问题:C++ Multi::isValid方法的具体用法?C++ Multi::isValid怎么用?C++ Multi::isValid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类llcurl::Multi
的用法示例。
在下文中一共展示了Multi::isValid方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: process
// Note: call once per frame
S32 LLCurlRequest::process()
{
S32 res = 0;
mProcessing = TRUE;
for (curlmulti_set_t::iterator iter = mMultiSet.begin();
iter != mMultiSet.end(); )
{
curlmulti_set_t::iterator curiter = iter++;
LLCurl::Multi* multi = *curiter;
if(!multi->isValid())
{
if(multi == mActiveMulti)
{
mActiveMulti = NULL ;
mActiveRequestCount = 0 ;
}
mMultiSet.erase(curiter) ;
LLCurl::getCurlThread()->killMulti(multi) ;
continue ;
}
S32 tres = multi->process();
res += tres;
if (multi != mActiveMulti && tres == 0 && multi->mQueued == 0)
{
mMultiSet.erase(curiter);
LLCurl::getCurlThread()->killMulti(multi);
}
}
mProcessing = FALSE;
return res;
}
示例2: getQueued
S32 LLCurlRequest::getQueued()
{
S32 queued = 0;
for (curlmulti_set_t::iterator iter = mMultiSet.begin();
iter != mMultiSet.end(); )
{
curlmulti_set_t::iterator curiter = iter++;
LLCurl::Multi* multi = *curiter;
if(!multi->isValid())
{
if(multi == mActiveMulti)
{
mActiveMulti = NULL ;
mActiveRequestCount = 0 ;
}
LLCurl::getCurlThread()->killMulti(multi);
mMultiSet.erase(curiter) ;
continue ;
}
queued += multi->mQueued;
if (multi->getState() != LLCurl::Multi::STATE_READY)
{
++queued;
}
}
return queued;
}
示例3: addMulti
void LLCurlRequest::addMulti()
{
LLCurl::Multi* multi = new LLCurl::Multi();
if(!multi->isValid())
{
LLCurl::getCurlThread()->killMulti(multi) ;
mActiveMulti = NULL ;
mActiveRequestCount = 0 ;
return;
}
mMultiSet.insert(multi);
mActiveMulti = multi;
mActiveRequestCount = 0;
}