10-09-2009 10:16 AM - edited 10-09-2009 10:26 AM
This is me again!
I reviewed some threads in this forum, but I could not solve the problem:
I have a socket connection to a winsock socket. The connection works fine, but after a random (can't find something that could cause it) time I get this exception:
net.rim.device.api.io.CommectionClosedException: Bad socket id
It's really confusing me, this is the simplified part where the connection is breaking down:
connection = (StreamConnection)Connector.open(url);
_in = new InputStreamReader(connection.openInputStream());
_out = new OutputStreamWriter(connection.openOutputStream());
while (! isInterrupted())
// send and receive something
catch (IOException e)
// exception handler <---------- Problem
Can you explain me what that means or better, what causes this?
Thank you in addition!
//Edit: Ah, I forgot to say that this happens only on the real device!
10-12-2009 08:47 AM
10-12-2009 06:07 PM
10-12-2009 11:46 PM
10-12-2009 11:55 PM - edited 10-12-2009 11:56 PM
No, in the case of Direct TCP (deviceside=true) the tunnel is IP. The device itself is generating TCP packets and processing the received TCP packets.
10-13-2009 06:28 AM
Yes it is deviceside=true; and im using WAP2.
The amout of data is unsteady, depends on the state of my application. I would say it is average 100kb per minute. This exception is not depending of the coverage (I think) because that would give me another one.