Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r84483 - trunk/boost/asio
From: chris_at_[hidden]
Date: 2013-05-25 07:38:02


Author: chris_kohlhoff
Date: 2013-05-25 07:38:01 EDT (Sat, 25 May 2013)
New Revision: 84483
URL: http://svn.boost.org/trac/boost/changeset/84483

Log:
Fix error in acceptor example. Refs #8421
Text files modified:
   trunk/boost/asio/basic_socket_acceptor.hpp | 10 ++++++----
   1 files changed, 6 insertions(+), 4 deletions(-)

Modified: trunk/boost/asio/basic_socket_acceptor.hpp
==============================================================================
--- trunk/boost/asio/basic_socket_acceptor.hpp (original)
+++ trunk/boost/asio/basic_socket_acceptor.hpp 2013-05-25 07:38:01 EDT (Sat, 25 May 2013)
@@ -365,8 +365,9 @@
    * @par Example
    * @code
    * boost::asio::ip::tcp::acceptor acceptor(io_service);
- * acceptor.open(boost::asio::ip::tcp::v4());
- * acceptor.bind(boost::asio::ip::tcp::endpoint(12345));
+ * boost::asio::ip::tcp::endpoint endpoint(boost::asio::ip::tcp::v4(), 12345);
+ * acceptor.open(endpoint.protocol());
+ * acceptor.bind(endpoint);
    * @endcode
    */
   void bind(const endpoint_type& endpoint)
@@ -389,9 +390,10 @@
    * @par Example
    * @code
    * boost::asio::ip::tcp::acceptor acceptor(io_service);
- * acceptor.open(boost::asio::ip::tcp::v4());
+ * boost::asio::ip::tcp::endpoint endpoint(boost::asio::ip::tcp::v4(), 12345);
+ * acceptor.open(endpoint.protocol());
    * boost::system::error_code ec;
- * acceptor.bind(boost::asio::ip::tcp::endpoint(12345), ec);
+ * acceptor.bind(endpoint, ec);
    * if (ec)
    * {
    * // An error occurred.


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk