I can tell if an input stream for a socket has received data with input.hasNextLine()
How can you test if an output stream for a socket has sent data?
Printable View
I can tell if an input stream for a socket has received data with input.hasNextLine()
How can you test if an output stream for a socket has sent data?
You can call output.flush() which forces any buffered data to be sent to the underlying stream. If you don't get an IOException, I think you can tell, that the data has been sent (not received, though!).