Client Server | developer.brewmp.com Client Server | developer.brewmp.com

Developer

Client Server

Forums:

When I connect the application to the Server through Prisma Kx17 device, it does get connected to the Server the first time. But In case I do not make any internal and external request to the Server for 25-30 seconds, it gets disconnected and it does not get connected unless I exit and connect it again. On other devices like LG5235, LG6335, & Kyocera the application is running properly.

The default Lingering time for TCP on the handset is 30 seconds. After that you will have re-establish the HTTP connection.
Why there is so much idle time in the application? Can you start a new IWeb everytime you need to exchange data with the server or does the app need constant connection open to the server?

The default Lingering time for TCP on the handset is 30 seconds. After that you will have re-establish the HTTP connection.
Why there is so much idle time in the application? Can you start a new IWeb everytime you need to exchange data with the server or does the app need constant connection open to the server?

I have use
INETMGR_SetLinger(pMe->App_Web.piNetMgr_IIIW, 10);
and every time make a new connection

I have use
INETMGR_SetLinger(pMe->App_Web.piNetMgr_IIIW, 10);
and every time make a new connection

and
INETMGR_SetLinger(pMe->App_Web.piNetMgr_IIIW, 300);

and
INETMGR_SetLinger(pMe->App_Web.piNetMgr_IIIW, 300);

thanks
with regards
rajesh bhati

thanks
with regards
rajesh bhati

If you change the phone's linger time, it will very likely fail TBT test.

If you change the phone's linger time, it will very likely fail TBT test.

arvind321 wrote:The default Lingering time for TCP on the handset is 30 seconds. After that you will have re-establish the HTTP connection.
Why there is so much idle time in the application? Can you start a new IWeb everytime you need to exchange data with the server or does the app need constant connection open to the server?
Thanks for reply, I explain you the steps of web connection.
At every time the web request is made,
First I create Instance of INETMGR,
Then set Linger time using INETMGR_SetLinger (checked at 10,30,300 etc..),
Then create instance of IWEB interface,
Create Instance of ISOURCEUTIL,
Get data in IPEEK using ISOURCEUTIL_PeekFromMemory
Set callBack function for getting response,
Set web options using IWEB_AddOpt as follows ,
WebOpt awo[10];
awo[i].nId = WEBOPT_HANDLERDATA;
awo[i].pVal = (void *)&pMe->App_Web.m_webact;
i++;
awo[i].nId = WEBOPT_METHOD;
awo[i].pVal = (void *)"POST";
i++;
awo[i].nId = WEBOPT_BODY;
awo[i].pVal = (void *)pMe->App_Web.m_webact.pipPostData_VIW;
i++;
awo[i].nId = WEBOPT_CONTENTLENGTH;
awo[i].pVal = (void *)(long)STRLEN(pMe->App_Web.ch_appBuffer);
i++;
awo[i].nId = WEBOPT_CONNECTTIMEOUT;
awo[i].pVal = (void *)35000; //To be in milliseconds (We have used different values here)
i++;
awo[i].nId = WEBOPT_IDLECONNTIMEOUT;
awo[i].pVal = (void *)30; (We have used different values here)
i++;
awo[i].nId = WEBOPT_END;
Call IWEB_GetResponse,
Now in CallBack response first get WebRespInfo from IWEBRESP_GetInfo() function,
Release ISOURCEUTIL and again create it's instance
get IGETLINE object from ISOURCEUTIL_GetLineFromSource,
If WEB_ERROR_SUCCEEDED(pWebRespInfo->nCode) return TRUE) then reads the data using
uin32 len=IGETLINE_Read(); using the following codes,
if(len > 0)
{
// process the data
}
else
{
if(len == IGETLINE_WAIT)
{
CALLBACK_Init(); // this function which contains only reading codes
IGETLINE_Peekable();
return;
}
else
{
//In case of web Errors show error prompt.
break;
}
}
Plz don't think about memory leaks because the same code is running on all the devices, But then also if you think about memory leak plz notic me.

arvind321 wrote:The default Lingering time for TCP on the handset is 30 seconds. After that you will have re-establish the HTTP connection.
Why there is so much idle time in the application? Can you start a new IWeb everytime you need to exchange data with the server or does the app need constant connection open to the server?
Thanks for reply, I explain you the steps of web connection.
At every time the web request is made,
First I create Instance of INETMGR,
Then set Linger time using INETMGR_SetLinger (checked at 10,30,300 etc..),
Then create instance of IWEB interface,
Create Instance of ISOURCEUTIL,
Get data in IPEEK using ISOURCEUTIL_PeekFromMemory
Set callBack function for getting response,
Set web options using IWEB_AddOpt as follows ,
WebOpt awo[10];
awo[i].nId = WEBOPT_HANDLERDATA;
awo[i].pVal = (void *)&pMe->App_Web.m_webact;
i++;
awo[i].nId = WEBOPT_METHOD;
awo[i].pVal = (void *)"POST";
i++;
awo[i].nId = WEBOPT_BODY;
awo[i].pVal = (void *)pMe->App_Web.m_webact.pipPostData_VIW;
i++;
awo[i].nId = WEBOPT_CONTENTLENGTH;
awo[i].pVal = (void *)(long)STRLEN(pMe->App_Web.ch_appBuffer);
i++;
awo[i].nId = WEBOPT_CONNECTTIMEOUT;
awo[i].pVal = (void *)35000; //To be in milliseconds (We have used different values here)
i++;
awo[i].nId = WEBOPT_IDLECONNTIMEOUT;
awo[i].pVal = (void *)30; (We have used different values here)
i++;
awo[i].nId = WEBOPT_END;
Call IWEB_GetResponse,
Now in CallBack response first get WebRespInfo from IWEBRESP_GetInfo() function,
Release ISOURCEUTIL and again create it's instance
get IGETLINE object from ISOURCEUTIL_GetLineFromSource,
If WEB_ERROR_SUCCEEDED(pWebRespInfo->nCode) return TRUE) then reads the data using
uin32 len=IGETLINE_Read(); using the following codes,
if(len > 0)
{
// process the data
}
else
{
if(len == IGETLINE_WAIT)
{
CALLBACK_Init(); // this function which contains only reading codes
IGETLINE_Peekable();
return;
}
else
{
//In case of web Errors show error prompt.
break;
}
}
Plz don't think about memory leaks because the same code is running on all the devices, But then also if you think about memory leak plz notic me.

You have written that you are not facing any problem on LG5235. We are also using the same phone, but during linger time if we start another data call, server is getting socket read time out or connection is breaking midway.
We are not changin linger time.

You have written that you are not facing any problem on LG5235. We are also using the same phone, but during linger time if we start another data call, server is getting socket read time out or connection is breaking midway.
We are not changin linger time.

hi ,
i am also working with LG 6335 , we are facing problem to connect to our server using TCP socket. our server is not getting any request from the device. We checked with the carrier(TATA tele sevices ) and they claimed that they allow only WAP enabled servers, where our's is TCP server. but you people( rashmi , rajesh ) are successfully connecting to the sever. how is it working? My code is working on emulator successfully,
can you say what may be the reason?
thanx for any comments
amarnath

hi ,
i am also working with LG 6335 , we are facing problem to connect to our server using TCP socket. our server is not getting any request from the device. We checked with the carrier(TATA tele sevices ) and they claimed that they allow only WAP enabled servers, where our's is TCP server. but you people( rashmi , rajesh ) are successfully connecting to the sever. how is it working? My code is working on emulator successfully,
can you say what may be the reason?
thanx for any comments
amarnath

Amarnath wrote:hi ,
i am also working with LG 6335 , we are facing problem to connect to our server using TCP socket. our server is not getting any request from the device. We checked with the carrier(TATA tele sevices ) and they claimed that they allow only WAP enabled servers, where our's is TCP server. but you people( rashmi , rajesh ) are successfully connecting to the sever. how is it working? My code is working on emulator successfully,
can you say what may be the reason?
thanx for any comments
amarnath
It sounds like you need to check your server configurations.
It is likely that your server is not giving the phone enough time
to connect.

Amarnath wrote:hi ,
i am also working with LG 6335 , we are facing problem to connect to our server using TCP socket. our server is not getting any request from the device. We checked with the carrier(TATA tele sevices ) and they claimed that they allow only WAP enabled servers, where our's is TCP server. but you people( rashmi , rajesh ) are successfully connecting to the sever. how is it working? My code is working on emulator successfully,
can you say what may be the reason?
thanx for any comments
amarnath
It sounds like you need to check your server configurations.
It is likely that your server is not giving the phone enough time
to connect.

Hi Jmiller !
thanx for your reply,
But actually at my server side not at all getting any request from the device , we confirmed with the help of Ethereal. One more thing is the same server is working successfully for both requests from Palm and Blackberyy devices( clients). But in the case of our device(BREW) it is failing to get request.
Is there any problem with my carrier? We are really fustrated with this.
thanx again, please help me to solve this problem
amarnath

Hi Jmiller !
thanx for your reply,
But actually at my server side not at all getting any request from the device , we confirmed with the help of Ethereal. One more thing is the same server is working successfully for both requests from Palm and Blackberyy devices( clients). But in the case of our device(BREW) it is failing to get request.
Is there any problem with my carrier? We are really fustrated with this.
thanx again, please help me to solve this problem
amarnath

hi,
we are also workin for TATA u have to put a reqst to TATA to open the URL u r trying to connect, other wise TATA firewalls block it. In the beginning we also faced the same prob with TATA.

hi,
we are also workin for TATA u have to put a reqst to TATA to open the URL u r trying to connect, other wise TATA firewalls block it. In the beginning we also faced the same prob with TATA.

hi ramesh!
Thanx for your reply, its really good news for us,
One more thing is how can we place a request to TATA. We already sent a mail to one of the TATA support but no reply we got and we called n number of times to customer support , every time they were saying your server should be WAP enabled :confused:
Can you please help me in placing the request, we are from Hyderabad.
thanx alot
amarnath

hi ramesh!
Thanx for your reply, its really good news for us,
One more thing is how can we place a request to TATA. We already sent a mail to one of the TATA support but no reply we got and we called n number of times to customer support , every time they were saying your server should be WAP enabled :confused:
Can you please help me in placing the request, we are from Hyderabad.
thanx alot
amarnath

hi,
if u are developing apps for TATA then u have to talk to the high level marketing guys of TATA ur company coordinating with.
Customer support is for end users and not for developers, they will not be knowing all these stuff.

hi,
if u are developing apps for TATA then u have to talk to the high level marketing guys of TATA ur company coordinating with.
Customer support is for end users and not for developers, they will not be knowing all these stuff.

Hi Ramesh,
Can you please refer us any contacts to get to these high end marketing persons of tataIndicom. I will be very thankful to you if you can help me.
Thanx a lot,
Amarnath.

Hi Ramesh,
Can you please refer us any contacts to get to these high end marketing persons of tataIndicom. I will be very thankful to you if you can help me.
Thanx a lot,
Amarnath.