
On 4/26/07, Christopher Kohlhoff <chris@kohlhoff.com> wrote:
On Tue, 24 Apr 2007 23:44:35 -0700, "Dean Michael Berris" <mikhailberis@gmail.com> said: [...]
For a myriad of reasons, we're using blocking API calls (boost::asio::read_until and boost::asio::write) but these API calls don't seem to readily have a way of setting a timeout value -- one that says "try reading until either the response matches this... or throw an error after 1 second if you don't get a response from the server".
Would there be a different way of going about it, aside from using asynchronous operations?
No, async operations would be the way to go. Something like (warning, untested code):
[snipped example] And it works! Thanks Chris, it's very much appreciated. :) -- Dean Michael C. Berris http://cplusplus-soup.blogspot.com/ mikhailberis AT gmail DOT com +63 928 7291459