]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/asio/test/local/datagram_protocol.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / asio / test / local / datagram_protocol.cpp
index fac6a2331961508147b400aa70642184fca0b741..20ceac8cc69259466bda8d4589bb2a4ffce022c1 100644 (file)
@@ -2,7 +2,7 @@
 // datagram_protocol.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)
@@ -17,7 +17,7 @@
 #include <boost/asio/local/datagram_protocol.hpp>
 
 #include <cstring>
-#include <boost/asio/io_service.hpp>
+#include <boost/asio/io_context.hpp>
 #include "../unit_test.hpp"
 
 //------------------------------------------------------------------------------
@@ -51,7 +51,7 @@ void test()
 
   try
   {
-    io_service ios;
+    io_context ioc;
     char mutable_char_buffer[128] = "";
     const char const_char_buffer[128] = "";
     socket_base::message_flags in_flags = 0;
@@ -61,16 +61,21 @@ void test()
 
     // basic_datagram_socket constructors.
 
-    dp::socket socket1(ios);
-    dp::socket socket2(ios, dp());
-    dp::socket socket3(ios, dp::endpoint(""));
+    dp::socket socket1(ioc);
+    dp::socket socket2(ioc, dp());
+    dp::socket socket3(ioc, dp::endpoint(""));
     int native_socket1 = ::socket(AF_UNIX, SOCK_DGRAM, 0);
-    dp::socket socket4(ios, dp(), native_socket1);
+    dp::socket socket4(ioc, dp(), native_socket1);
 
     // basic_io_object functions.
 
-    io_service& ios_ref = socket1.get_io_service();
-    (void)ios_ref;
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+    io_context& ioc_ref = socket1.get_io_context();
+    (void)ioc_ref;
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+    dp::socket::executor_type ex = socket1.get_executor();
+    (void)ex;
 
     // basic_socket functions.
 
@@ -91,7 +96,7 @@ void test()
     socket1.close();
     socket1.close(ec);
 
-    dp::socket::native_type native_socket4 = socket1.native();
+    dp::socket::native_handle_type native_socket4 = socket1.native_handle();
     (void)native_socket4;
 
     socket1.cancel();