]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/asio/example/cpp03/echo/blocking_udp_echo_server.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / asio / example / cpp03 / echo / blocking_udp_echo_server.cpp
index d86f390a457b2909debfe1ae189db98fab2c21ad..5e70a6e44f5bcf40feb70bfabd2e69ce27140f13 100644 (file)
@@ -2,7 +2,7 @@
 // blocking_udp_echo_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)
@@ -16,9 +16,9 @@ using boost::asio::ip::udp;
 
 enum { max_length = 1024 };
 
-void server(boost::asio::io_service& io_service, unsigned short port)
+void server(boost::asio::io_context& io_context, unsigned short port)
 {
-  udp::socket sock(io_service, udp::endpoint(udp::v4(), port));
+  udp::socket sock(io_context, udp::endpoint(udp::v4(), port));
   for (;;)
   {
     char data[max_length];
@@ -39,10 +39,10 @@ int main(int argc, char* argv[])
       return 1;
     }
 
-    boost::asio::io_service io_service;
+    boost::asio::io_context io_context;
 
     using namespace std; // For atoi.
-    server(io_service, atoi(argv[1]));
+    server(io_context, atoi(argv[1]));
   }
   catch (std::exception& e)
   {