Re: [Boost-users] Asio - Errors (Igor R)

-----Original Message----- From: Igor R <boost.lists@gmail.com> Sent: Friday, July 25, 2008 10:20 AM To: boost-users@lists.boost.org Subject: Re: [Boost-users] Asio - Errors (Igor R)
I guess this means the socket itself is invalid but if i put the local end point into the constructor for the socket_ as below it works fine.
socket_(io_service, udp::endpoint( udp::v4(), port ) )
According to the ASIO reference: http://www.boost.org/doc/libs/1_35_0/doc/html/boost_asio/reference/basic_dat... "This constructor creates a datagram socket and automatically opens it bound to the specified endpoint on the local machine. " In your example, the socket was created but it's not "open" yet, (so it doesn't have a valid handle). So before you bind() it, you have to open() it: http://www.boost.org/doc/libs/1_35_0/doc/html/boost_asio/reference/basic_dat... _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (1)
-
Brian T Crowder