Correctly identify socket read/write on Windows.
Explicitly return upon error in readResponse.