Boost logo

Boost Users :

Subject: [Boost-users] boost::asio one connectio-per-thread
From: Christer Borgqvist (christer.borgqvist10_at_[hidden])
Date: 2012-05-24 04:25:02


Hello,
is this a code appropriate?

    boost::asio::io_service io_service;
    tcp::acceptor a(io_service, tcp::endpoint(tcp::v4(),3080));
    for (;;) {
        socket_ptr sock(new tcp::socket(io_service));
        a.accept(*sock);
        emv_clientthread_ptr cli(new axf::server::server_socket(sock));
        boost::thread t(boost::bind(&axf::server::server_socket::start,
cli));
    }
appreciate any help.
Christer


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net