]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/asio/example/cpp03/iostreams/daytime_server.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / asio / example / cpp03 / iostreams / daytime_server.cpp
index d7c4141effc52946f75347f62915a78bd58bf0cc..3e0356c79bbdc46ac5fd1c4a5067c561ca26197a 100644 (file)
@@ -2,7 +2,7 @@
 // daytime_server.cpp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -26,16 +26,16 @@ int main()
 {
   try
   {
-    boost::asio::io_service io_service;
+    boost::asio::io_context io_context;
 
     tcp::endpoint endpoint(tcp::v4(), 13);
-    tcp::acceptor acceptor(io_service, endpoint);
+    tcp::acceptor acceptor(io_context, endpoint);
 
     for (;;)
     {
       tcp::iostream stream;
       boost::system::error_code ec;
-      acceptor.accept(*stream.rdbuf(), ec);
+      acceptor.accept(stream.socket(), ec);
       if (!ec)
       {
         stream << make_daytime_string();