Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Regular Contributor
Posts: 74
Registered: ‎01-12-2012
My Device: Developer
My Carrier: Developer

Opening/Closing httpconnection important ?

Hi, Thanks in advance for all the help... all is appreciated.

I have more of a question (not a problem)..

I am making an trivia application - in which I collect a picture from the web when ever the user answer a question.
example: ((getpicturefromWeb - askquestion => Yes/No) repeat this until game is over/won) .

So as you can see the user is able to press Yes/No button (to fetch next picture and proceed to next question) in a fast way...
My question is it Better to have the Http Connection OPEN as long as the game is still not OVER.(so I would CLOSE the connection whenever the game ends/isOver), Or do you think that it is fairly IMPORTANT to fetch each picture with a separate http (meaning I would close the connection whenever a Picture is fetched from the web) .

I have read that it is important to close the connection you open, but the question is regarding number of http requests per game ? is it better to have a single call throughout the game and have for each request it own call? 

All help appreciated... :-) Thanks

Developer
Posts: 16,999
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Opening/Closing httpconnection important ?

i would use a separate connection and close the old one beforehand.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter