本文整理汇总了C++中PHTTP_BMO_REQ_OBJECT::SetRecvContext方法的典型用法代码示例。如果您正苦于以下问题:C++ PHTTP_BMO_REQ_OBJECT::SetRecvContext方法的具体用法?C++ PHTTP_BMO_REQ_OBJECT::SetRecvContext怎么用?C++ PHTTP_BMO_REQ_OBJECT::SetRecvContext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHTTP_BMO_REQ_OBJECT
的用法示例。
在下文中一共展示了PHTTP_BMO_REQ_OBJECT::SetRecvContext方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AnscSListPushEntry
ANSC_STATUS
HttpSpoManufactureBmoReqPool
(
ANSC_HANDLE hThisObject
)
{
ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS;
PHTTP_SIMPLE_PROXY_OBJECT pMyObject = (PHTTP_SIMPLE_PROXY_OBJECT )hThisObject;
PHTTP_SIMPLE_PROXY_PROPERTY pProperty = (PHTTP_SIMPLE_PROXY_PROPERTY)&pMyObject->Property;
PHTTP_HFP_INTERFACE pHfpIf = (PHTTP_HFP_INTERFACE )pMyObject->hHfpIf;
PHTTP_BMO_REQ_OBJECT pBmoReq = NULL;
ULONG i = 0;
if ( pMyObject->ProxyMode & HTTP_SPO_MODE_COMPACT )
{
return ANSC_STATUS_SUCCESS;
}
for ( i = 0; i < HTTP_SPO_INITIAL_BMO_NUMBER; i++ )
{
pBmoReq =
(PHTTP_BMO_REQ_OBJECT)HttpCreateBmoReq
(
pMyObject->hContainerContext,
(ANSC_HANDLE)pMyObject,
(ANSC_HANDLE)NULL
);
if ( !pBmoReq )
{
continue;
}
else
{
pBmoReq->SetHfpIf ((ANSC_HANDLE)pBmoReq, (ANSC_HANDLE)pHfpIf);
pBmoReq->SetRecvContext((ANSC_HANDLE)pBmoReq, (ANSC_HANDLE)NULL );
pBmoReq->SetSendContext((ANSC_HANDLE)pBmoReq, (ANSC_HANDLE)NULL );
}
AnscAcquireLock (&pMyObject->BmoReqSListLock);
AnscSListPushEntry(&pMyObject->BmoReqSList, &pBmoReq->Linkage);
AnscReleaseLock (&pMyObject->BmoReqSListLock);
}
return ANSC_STATUS_SUCCESS;
}
示例2: AnscAcquireLock
ANSC_HANDLE
HttpSpoAcquireBmoReq
(
ANSC_HANDLE hThisObject
)
{
ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS;
PHTTP_SIMPLE_PROXY_OBJECT pMyObject = (PHTTP_SIMPLE_PROXY_OBJECT )hThisObject;
PHTTP_SIMPLE_PROXY_PROPERTY pProperty = (PHTTP_SIMPLE_PROXY_PROPERTY)&pMyObject->Property;
PHTTP_HFP_INTERFACE pHfpIf = (PHTTP_HFP_INTERFACE )pMyObject->hHfpIf;
PHTTP_BMO_REQ_OBJECT pBmoReq = NULL;
PSINGLE_LINK_ENTRY pSLinkEntry = NULL;
AnscAcquireLock(&pMyObject->BmoReqSListLock);
pSLinkEntry = AnscSListPopEntry(&pMyObject->BmoReqSList);
AnscReleaseLock(&pMyObject->BmoReqSListLock);
if ( pSLinkEntry )
{
pBmoReq = ACCESS_HTTP_BMO_REQ_OBJECT(pSLinkEntry);
return (ANSC_HANDLE)pBmoReq;
}
pBmoReq =
(PHTTP_BMO_REQ_OBJECT)HttpCreateBmoReq
(
pMyObject->hContainerContext,
(ANSC_HANDLE)pMyObject,
(ANSC_HANDLE)NULL
);
if ( !pBmoReq )
{
return (ANSC_HANDLE)NULL;
}
else
{
pBmoReq->SetHfpIf ((ANSC_HANDLE)pBmoReq, (ANSC_HANDLE)pHfpIf);
pBmoReq->SetRecvContext((ANSC_HANDLE)pBmoReq, (ANSC_HANDLE)NULL );
pBmoReq->SetSendContext((ANSC_HANDLE)pBmoReq, (ANSC_HANDLE)NULL );
}
return (ANSC_HANDLE)pBmoReq;
}