
6 Apr
2011
6 Apr
'11
8:03 a.m.
No, I'm sorry I forgot one line at the end:
thread = boost::thread(boost::bind(&boost::asio::io_service::run, &io_service));
Ok, but this line just creates a thread and passes to it io_service::run() -- it doesn't block your current thread, where you issued async_accept. Ensure that the thread where you *call* async_accept() doesn't ends before the operation is complete.