I have a GUI application that makes a connection with a server. I want to avoid that my GUI freezes when waiting for a response for the server. I had the idea of using istream::readsome in combination with a Timer (read a little on each timer event until complete) but since I am not really familiar with IO coding I suspect there may be superior ways.

> I have a GUI application that makes a connection with a server. I want to avoid that my GUI freezes when waiting for a response for the server. I had the idea of using istream::readsome in combination with a Timer (read a little on each timer event until complete) but since I am not really familiar with IO coding I suspect there may be superior ways.
>
> I would appreciate to learn your insights on this :)

Francis,

I'd put client session in a separate Thread and use NotificationQueue or delegates. To learn how to run HTTP client in a separate thread, look into Net HTTPLoadTest sample. There is Foundation sample for NotificationQueue in Foundation and for delegates, look up Ping sample in Net.