io_service一般作为处理工作的work pool。网络中,作为服务器接收用,可以加速处理收到的信息。主要有post, dispatch, stop, run. 几可常用方法。通常还会用到boost bind一起使用io_service是并发的,在队列中,有几个run, 就有几个并发进行;而对于strand 是严格顺序进行的调用。看下面的例子:#include <iostream>#include <boost/shared_ptr.hpp>#include <boost/asio.hpp>#include <iostream>#inclu Read More
posted @ 2012-07-13 15:22 upendi Views(6984) Comments(0) Diggs(0) Edit