I want to send a command to a server, and find out if I get a response.
Right now i am using BufferedReader
's readline()
function, which blocks until there's a response from server, but all I want to do is verify that there's a response from the server in the first place.
I tried using ready()
or reset()
to avoid this block, but it doesn't help.
This is causing my program to get stuck waiting for the server to respond, which never happens. InputStreamReader
seems to do the same thing, by my understanding of things.
Other questions I found here on the subject didn't answer my question, so please if you can answer my question it will be great.
flush()
and ensure that a newline (println
) was sent. – Arboreous