BlackBerry Forums Support Community

Closed Thread
LinkBack Thread Tools
Old 06-18-2009, 07:35 AM   #1 (permalink)
New Member
Join Date: Jul 2008
Model: 8800
Carrier: att
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default socket close issue.

Please Login to Remove!

Hi All, I am developing an applicaiton which uses direct TCP connection to talk to our server, everything works fine until i

cancel a ongoing transaction. by cancel i mean i close a all the input stream and output stream alongwith the socket when

user presses a cancel button displayed on screen while a transaction is going on. the problematic scenario is when user

presses cancel and again start the transaction, at that the whole procedure of getting a new socket, output stream and input

stream repeat but when i try to write something to this new output stream it blocks itself there and the next line below that

never gets executed. and hence no network communication ( i am writing in two chunks i.e first header and then payload while

writing it blocks itself and never comes up again to write the payload and my processing animation goes on foreever).

if(null != outStream)
outStream.write(m_data); at this line it get stuck...this is running in a
loop under a thread and my next packet to be
written never gets written on a scoket.
if(null != outStream)
I am kinda stuck here. please help asap.
thanks dcdel.
Old 06-18-2009, 08:02 AM   #2 (permalink)
Stuck In The '70's Mod
ndub33's Avatar
Join Date: Feb 2006
Location: The 'burbs east of Seattle.
Model: 9810
Carrier: T-Mobile
Posts: 7,600
Post Thanks: 0
Thanked 4 Times in 4 Posts

Moving to the Developer's Forum.
1st Step in Troubleshooting: Do you have a BlackBerry Data Plan?
2nd Step in Troubleshooting: Pull the Battery.

Last edited by ndub33 : 06-18-2009 at 08:03 AM.

Copyright 2004-2016
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.