
10 Nov
2009
10 Nov
'09
12:29 p.m.
boost::asio::io_service io_service; tcp_server server(io_service); io_service.run();
io_service::run() does not return until there's no work for io_service. But you can run io_service in another thread: new boost::thread(&asio::io_service::run, &io_service); // note that io_service object can't be local here, as it must outlive the thread!