timelimit for an http connection

Forum for J2ME mobile games related topics including programming doubts, books and other resources for J2ME game development

timelimit for an http connection

Postby hemavarthini » Tue Aug 14, 2007 7:22 am

Hi
Is there is any possibility to set timelimit for the http connection to avoid breaking the connection.So that it should try the connection again and again upto the timelimit we have given


Thanks in Adavance
hemavarthini
 
Posts: 28
Joined: Fri Mar 23, 2007 7:07 am

Postby DevelopmentTeam » Tue Aug 14, 2007 7:39 am

In such case we need to add a simple code piece to the old code J2ME Http Connection, To set max number of tries, increment a counter in the thread everytime the connection fails and retry again inside a while loop. I dont think there is some code inbuilt in J2ME.
User avatar
DevelopmentTeam
Site Admin
 
Posts: 661
Joined: Tue Aug 15, 2006 8:39 am
Location: India

Postby hemavarthini » Tue Aug 14, 2007 8:51 am

I have tried with this option already.But everytime it asks the user "MIDlet is trying to connect network.Is it ok for u?".So the user will be getting irritated if it asks more than once for every single request.So I thought of dropping this idea.So if there is any other way,let me know that .
Thanks
hemavarthini
 
Posts: 28
Joined: Fri Mar 23, 2007 7:07 am

Postby DevelopmentTeam » Tue Aug 14, 2007 10:34 am

which mobile r u testing on? coz the handset asks the question only once for a puticular url. And only in case you connect to a new url, it asks again. This case is same for Nokia, Sony Ericsson and motorola mobile models.
User avatar
DevelopmentTeam
Site Admin
 
Posts: 661
Joined: Tue Aug 15, 2006 8:39 am
Location: India


Return to J2ME Games

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron