本文整理汇总了C++中HttpRequest::StopRequest方法的典型用法代码示例。如果您正苦于以下问题:C++ HttpRequest::StopRequest方法的具体用法?C++ HttpRequest::StopRequest怎么用?C++ HttpRequest::StopRequest使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HttpRequest
的用法示例。
在下文中一共展示了HttpRequest::StopRequest方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: StopRequest
bool HttpRequestManager::StopRequest(unsigned long requestId, bool bWait) {
FileLog("httprequest", "HttpRequestManager::StopRequest( requestId : %lu, bWait : %s )", requestId, bWait?"true":"false");
bool bFlag = false;
HttpRequest *request = NULL;
mKMutex.lock();
HttpRequestMap::iterator itr = mHttpRequestMap.find(requestId);
if( itr != mHttpRequestMap.end() ) {
// IHttpRequestManagerCallbackMap::iterator itr2 = mIHttpRequestManagerCallbackMap.find(requestId);
// if( itr2 != mIHttpRequestManagerCallbackMap.end() ) {
// mIHttpRequestManagerCallbackMap.erase(itr2);
// }
request = itr->second;
request->StopRequest();
// mHttpRequestMap.erase(itr);
bFlag = true;
}
mKMutex.unlock();
// if( request != NULL ) {
// request->StopRequest(bWait);
// delete request;
// }
return bFlag;
}
示例2: StopAllRequest
void HttpRequestManager::StopAllRequest() {
FileLog("httprequest", "HttpRequestManager::StopAllRequest()");
HttpRequest *request = NULL;
mKMutex.lock();
for(HttpRequestMap::iterator itr = mHttpRequestMap.begin(); itr != mHttpRequestMap.end(); itr++) {
request = itr->second;
if( request != NULL ) {
request->StopRequest();
}
}
mKMutex.unlock();
}