Forums Register Login

blocking read method

+Pie Number of slices to send: Send
hi all,

I have a typical networking problem, where a clientSocket sends data to a serverSocket. While the client is transmitting a file, and in the middle of it, if client's network fails then at the server end the stream's read method seems to go in infinite loop.
Most craziest part is even after a long time it doesn't seem to throw an exception.
Can anyone help me???

(even though this is a typical networking problem, i somehow feel that there is some problem with the streams, so have put it in streams section)

thanks,
~rkay
+Pie Number of slices to send: Send
Rkay, we try to keep things friendly around here so we ask that everyone use a first name and last name as their displayed name, and that the displayed name is not obviously fake (our naming policy). You can change your displayed name here.
As for your problem. Yes, that sounds unusual. However, I don't think you've given us enough information. How about a small snippet of code?
+Pie Number of slices to send: Send
Sorry Joe, for hiding my name with rkay.
Here is the code snippet where read method gets blocked.
Here all the out stream part has been removed for simplicity.
Here MAX_BUFFER_SIZE is 8196;
InputStream strm, long dataSize are the inputs to this method:

thanks
~ravinder

[added [code] tags - Jim]
[ March 19, 2006: Message edited by: Jim Yingst ]
I am not young enough to know everything. - Oscar Wilde This tiny ad thinks it knows more than Oscar:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 682 times.
Similar Threads
Unresolved Host Exception
App hung at waitFor() method.
how to knoe if the files are being generated?
Exceptions
how to use ByteArrayInputStream?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 02:58:30.