I'm having problems with PrintStreams. I've created a program which reads and writes data on a socket, using BufferedReader and PrintStreams. If there is data going both ways it works okay. If there is data to send but none to receive i keep getting intermittent errors when i try writing to the socket. Below is a test program that i've knocked together.
The system.out.println statement at the error here label returns true but as far as i can see there is nothing wrong with the socket connection or the printstream. Has anybody come across a similar problem before?
JCE: Please use Code Tags [ August 18, 2008: Message edited by: Joe Ess ]
Welcome to the JavaRanch. Have a look at our FAQ: How to ask Questions. For example, few of us have time to read 250 lines of code, so you need to Isolate The Problem. You also need to Tell the Details. If you are getting an exception, we need to know what it is. Post the stack trace as it contains valuable information as to the location and circumstances of the exception. The better question you ask, the more help we can be.