Is there a way to make BufferedReader.readLine() not hang?
I'm creating a server that:
- Checks if the client has delivered any input.
- If not, it executes other code and eventually loops back to checking the client for input.
How can I check if the client has delivered any input without running readLine()? If I run readLine(), the thread will hang until input is delivered?