Check whether client disconnected
Checks whether the client disconnected.
Returns 1 if client disconnected, 0 otherwise.