Thanks Igor. I'm trying out calling set_option in my HandleAccept function (because the socket is open by that point), does that make sense? - Alex
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Igor R Sent: Wednesday, August 05, 2009 6:38 PM To: boost-users@lists.boost.org Subject: Re: [Boost-users] Boost::asio, set tcp_nodelay, bad file descriptor?
I created the acceptor like this:
m_pAcceptor = shared_ptrtcp::acceptor( new tcp::acceptor(m_IoService, tcp::endpoint(tcp::v4(), port)) );
Sorry, I didn't pay attention that the exception was at set_option() line. You try to set_option() on a new "unopened" socket. Try and open it using one of these overloads: http://www.boost.org/doc/libs/1_39_0/doc/html/boost_asio/refer ence/basic_stream_socket/open.html _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users