true if Listen was called and the connection is waiting; -or-true if the data is readable; -or-true if the connection was closed, reset, or terminated; otherwise returns false.
I understand that you want to check if the second option returns true? After checking that the polling response is correct, you can check if the connection is open, which means; not connection closed, reset or completed.
If it is open, then the second parameter returns true.
source
share