while(responseData.indexOf("\n") == -1) { DoEvents(); } (excuse the pseudo code) or something, to poll the response and wait until a response has actually been received.