dcsimg
How to close data connection?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Chris_Nappip
Posted On:   Saturday, September 14, 2002 11:22 AM

Hi,


I have written a small application for a Siemens M50 handset, which is downloading some data from a Java servlet via a javax.microedition.io.StreamConnection. The problem I have now is, that I am closing all the input- and outputstream and also the StreamConnection, but the phone is still dialed in. Can you tell me a way how to hang up the phone??


Chris

Re: How to close data connection?

Posted By:   James_McLachlan  
Posted On:   Saturday, September 14, 2002 01:59 PM

Hi Chris,

I had exactly the same problem. The reason the connection is staying open is that you are using HTTP 1.1 (which leaves it open by default).

To solve this, add the following:


myConn.setRequestProperty("connection", "close");

Hope that solves it :-)

Jim.

About | Sitemap | Contact