Connection timeout | developer.brewmp.com Connection timeout | developer.brewmp.com

Developer

Connection timeout

Forums:

I'm using the IWeb interface for a connection ...

When I'm running the application, it all workc ok, but only if the
computer is connected to the Internet. If I

take out the LAN cable, i get the "Connecting" status
and then nothing happens. How can I implement an

Timeout for the
connection ? I tried the WEBOPT_CONNECTTIMEOUT but it won't work.

 

 

i have also set value of WEBOPT_CONNECTTIMEOUT  0

which take default time out.

 

i have also set value of WEBOPT_CONNECTTIMEOUT  4000 ( 4 sec)

but it is also not working.

 

i got only stetus is WEBS_STARTING

then call is not come back on CB funtion.

i wait up to 5 min

now if i cancle the app then call come on this funtion with stetus WEBS_CANCELLED.

 

How i can know that connectin is time out. & where call is come affter time out.

plz help me.....

 

please reply...............................

please reply...............................

if u disconnect LAN, you should get an appropriate error code in readResponse function callback (the one that is set in pWeb->m_CB (AEECallback)).
 
IWEB_GetResponse(pWeb->m_pIWeb,(pWeb->m_pIWeb, &pWeb->m_pIWebResp, &pWeb->m_CB, pWeb->pUrl,
WEBOPT_HANDLERDATA, pWeb,
WEBOPT_METHOD, "GET",
WEBOPT_END));
 

if u disconnect LAN, you should get an appropriate error code in readResponse function callback (the one that is set in pWeb->m_CB (AEECallback)).
 
IWEB_GetResponse(pWeb->m_pIWeb,(pWeb->m_pIWeb, &pWeb->m_pIWebResp, &pWeb->m_CB, pWeb->pUrl,
WEBOPT_HANDLERDATA, pWeb,
WEBOPT_METHOD, "GET",
WEBOPT_END));
 

yes i am useing this
 
CALLBACK_Init( &(m_paee_callback),gotResponse,pApp->m_pWebCommuniction);
IWEB_GetResponse(m_pweb,(m_pweb, &m_pweb_response,
                                        &m_paee_callback,URL,WEBOPT_METHOD, "GET",                                WEBOPT_STATUSHANDLER,gotStatus,
WEBOPT_CONNECTTIMEOUT,4000,WEBOPT_END));
 
but when i remove the LAN cable call is now come on gotResponse.
please help.....

yes i am useing this
 
CALLBACK_Init( &(m_paee_callback),gotResponse,pApp->m_pWebCommuniction);
IWEB_GetResponse(m_pweb,(m_pweb, &m_pweb_response,
                                        &m_paee_callback,URL,WEBOPT_METHOD, "GET",                                WEBOPT_STATUSHANDLER,gotStatus,
WEBOPT_CONNECTTIMEOUT,4000,WEBOPT_END));
 
but when i remove the LAN cable call is now come on gotResponse.
please help.....

on which simulator / brew version do u try this.
it works for me on legacy 3.1.5 simulator.

on which simulator / brew version do u try this.
it works for me on legacy 3.1.5 simulator.

i am useing BREW MP
Candy Bar (1.0.3.800) &  Jade (1.0.3.800)
 

i am useing BREW MP
Candy Bar (1.0.3.800) &  Jade (1.0.3.800)
 

Thanks  shivendra.
now it's work fine.........

Thanks  shivendra.
now it's work fine.........