2011年11月17日 星期四

Stop CURL_EASY_PERFORM

Any of the callbacks (read/write/header/progress/debug/...) can be used to abort the transfer.


int Curlplus::writer(char *data, size_t size, size_t nmemb, void *lParam)
{
    if (lParam == NULL)
        return 0;

     Curlplus* pThis = (Curlplus* )lParam;
       int len = size*nmemb;

if(!pThis->m_bStopParse)
pThis->vParseData(data,len);
        else
return CURLE_ABORTED_BY_CALLBACK;
}

沒有留言:

張貼留言