How to stop a IWebGetResponse() | developer.brewmp.com How to stop a IWebGetResponse() | developer.brewmp.com

Developer

How to stop a IWebGetResponse()

Forums:

Hello Friends,

I am supposed to implement the tearing down of ongoing IWeb Data-Session when user Cancels it. Could someone let me know, how do I stop / tear-down an ongoing IWeb Data Session initiated using IWebGetResponse().

Thanks a Lot !!
Tanveer

Hello tanveer,
Cancelling the callback using CALLBACK_Cancel() will stop the data session.
Thanks,
Mahehs

Hello tanveer,
Cancelling the callback using CALLBACK_Cancel() will stop the data session.
Thanks,
Mahehs

Thanks Mahesh..

Thanks Mahesh..

yes it ll suffice ur need,
and also release the instances u have created and free the buffers used to fill up the response and if its a post the req buffer
if(&pMe->m_Callback)
CALLBACK_Cancel(&pMe->m_Callback);
if (pMe->m_pIWebResp)
{
IWEBRESP_Release(pMe->m_pIWebResp);
pMe->m_pIWebResp = NULL;
}
if (pMe->m_pIWeb)
{
IWEB_Release(pMe->m_pIWeb);
pMe->m_pIWeb = NULL;
}
if (pMe->m_BodyBuffer)
{
FREE(pMe->m_BodyBuffer);
pMe->m_BodyBuffer = NULL;
}
if(pMe->m_pISource)
{
ISOURCE_Release(pMe->m_pISource);
pMe->m_pISource=NULL;
}
FREEIF(pMe->pszPostData);
:)

yes it ll suffice ur need,
and also release the instances u have created and free the buffers used to fill up the response and if its a post the req buffer
if(&pMe->m_Callback)
CALLBACK_Cancel(&pMe->m_Callback);
if (pMe->m_pIWebResp)
{
IWEBRESP_Release(pMe->m_pIWebResp);
pMe->m_pIWebResp = NULL;
}
if (pMe->m_pIWeb)
{
IWEB_Release(pMe->m_pIWeb);
pMe->m_pIWeb = NULL;
}
if (pMe->m_BodyBuffer)
{
FREE(pMe->m_BodyBuffer);
pMe->m_BodyBuffer = NULL;
}
if(pMe->m_pISource)
{
ISOURCE_Release(pMe->m_pISource);
pMe->m_pISource=NULL;
}
FREEIF(pMe->pszPostData);
:)