maxitis is correct. Please check out examples of this type of coding and you'll see that most use while loops to capture all streamed text from the server.