×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    11

    Keeping a dial-up connection alive

    Hi,

    We have a J2ME app that performs searches on a database. Unfortunately, while you're looking at one set of results the dial-up connection gets dropped automatically and then when the next page is requested the whole process starts again.

    Is there any way of keeping a dial-up connection open while the app is running without just polling a spare url in the background?

    Thanks,

    Alex.

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395
    On my phone, the connection stays open if you don't close the HttpConnection objects properly. You could take advantage of this, but I don't know how reliable it would be.

    If you never close the connections, you will eventually run out.

    If your phone has such an option, you may be able to change the connection mode from "as needed" to "permanent"?

    Graham.

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    11
    Graham,

    Thanks, that has fixed my problem. I was opening a connection in the background to attempt to keep the dial-in alive, but never making the transition to "connected".

    The change I have made is instead of calling conn.close() when i've finished with a connection, i wait until i'm opening the next one, and then close the previous one it first.

    Many thanks,

    Alex.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×