This content has been marked as final.
Show 3 replies
-
1. Re: Large message lost packets
clebert.suconic Mar 15, 2010 10:13 AM (in response to the.finder1)Do you see any logging on server/client?
I have tried replicating your program here, and I couldn't get any failures.
One thing though.. I'm not sure why you're using a BufferedInputStream, since the ByteArray is already complete.
You usually need a BufferedStream when dealing with reading files or sockets to avoid extra calls to the OS resource.
-
2. Re: Large message lost packets
the.finder1 Mar 15, 2010 11:27 AM (in response to clebert.suconic)Thanks Clebert, I remove codes about BufferedInputStream and BufferedOutputStream, everything got OK.
I will take more time to find why.
-
3. Re: Large message lost packets
timfox Mar 15, 2010 4:15 PM (in response to the.finder1)The bug is in your code. You don't flush the ByteArrayOutputStream before retrieving the String.