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
New Developer
Posts: 7
Registered: ‎11-19-2008
My Device: Not Specified

Re: InputStream.read() block even if the network is disconnected

hi all,

 

On Blackberry 8520, V4.6.1.305, I tested again, the result is same as on the 4.5.

 

After disconnected the radio, I have waited for ten minutes, the read() did not return, and then I connected the radio,

waited it for ten minutes again, the read() was still no response.

 

I try to open socket with below code:

Connector.open(url + ";deviceside=true"))

 

but I do not find anything different. The read() is block always.

 

Any ideas?

or where can I get help of the formal support of Blackberry (RIM)?

 

 

 

New Developer
Posts: 7
Registered: ‎11-19-2008
My Device: Not Specified

Re: InputStream.read() block even if the network is disconnected

hi all,

 

  1. using HttpConnection on the device 8520, if turned off the radio when read(), the read() can return an Exception: TCP receive timed out.
  2. using SocketConnection on the same device, and try to download the same file on a server, when read(), turned off the radio, after an hour, the app was still blocked in the function read()

So, I am puzzled as SocketConnection read function does not have a timeout mechanism?

 

PS,

the device 8520 has a OS version 4.6