Boost logo

Boost Users :

From: Jean-Sebastien Stoezel (js.stoezel_at_[hidden])
Date: 2008-08-07 13:40:47


Hi,

The following code:

boost::asio::ip::tcp::acceptor myacceptor(m_IoService);
myacceptor.open(boost::asio::ip::tcp::v4());
boost::asio::ip::tcp::endpoint endpoint = myacceptor.local_endpoint();

generates the following exception:
"An invalid argument was supplied"

when myacceptor.local_endpoint() is invoked.

any idea?

On 8/7/08, Igor R <boost.lists_at_[hidden]> wrote:
> > Then when I do:
> >
> > boost::asio::ip::tcp::acceptor acceptor(m_IoService);
> >
> > when I call
> >
> > boost::asio::ip::tcp::endpoint endpoint = acceptor.local_endpoint();
> >
> > I get an exception as follow:
> > "The file handle supplied is not valid"
>
> You have to open() the acceptor:
> http://www.boost.org/doc/libs/1_35_0/doc/html/boost_asio/reference/basic_socket_acceptor/open.html
>


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