Non-blocking i/o using ASIO socket
Hello all, Can you please advise where we need to use "non_blocking_io" flag in ASIO sockets. IIUC, we can do the same using all of the async_xxxx functions provided in the various socket classes. Does it mean that if we do not wish to use ioservice::post() mechanism, we have the option to use "non_blocking_io" flag and implement async functionality? Thanks, Vikas
Hello
On Jan 9, 2008 12:48 PM, Chauhan, Vikas
Hello all,
Can you please advise where we need to use "non_blocking_io" flag in ASIO sockets. IIUC, we can do the same using all of the async_xxxx functions provided in the various socket classes.
If you use async_* functions, then your code by default is non-blocking. You can see examples of using several strategies at http://alexott.blogspot.com/2007/10/what-is-boostasio-and-why-we-should-use.... (links to examples are in comments, as my main site currently not available)
Does it mean that if we do not wish to use ioservice::post() mechanism, we have the option to use "non_blocking_io" flag and implement async functionality?
-- With best wishes, Alex Ott, MBA http://alexott.blogspot.com/ http://alexott-ru.blogspot.com/ http://content-filtering.blogspot.com/ http://xtalk.msk.su/~ott/
participants (2)
-
Alex Ott
-
Chauhan, Vikas