<div dir="ltr"><div class="gmail_quote"> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">I have understood it yesterday evening when I read about boos.shared_ptr but I still don't understand why connection object must be noncopyable... </blockquote> <div> </div> <div>You can make it copyable if you wish, but if the an object has an asio socket as a member, then it's non-copyable just because the socket object is non-copyable.</div> <div> </div> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><span id=""></span> <div class="Ih2E3d"> <div dir="ltr"> <div class="gmail_quote">I don't understand how it works :(. we have few <a name="11f3b5ca1b328b9b_sg_0">io</a>_service object which are run() in separated threads. but only one is maintained by <a name="11f3b5ca1b328b9b_sg_1">async</a>_accept chain trick. the rest run() should immediately return.</div> </div></div></blockquote> <div> </div> <div>Please, read that example carefully, there's an explanation inside. You've got special "work" object that prevents io_service::run from stopping.</div> <div> </div></div></div>