summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/asio/src/tests/unit/local/datagram_protocol.cpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/asio/src/tests/unit/local/datagram_protocol.cpp')
-rw-r--r--3rdparty/asio/src/tests/unit/local/datagram_protocol.cpp28
1 files changed, 17 insertions, 11 deletions
diff --git a/3rdparty/asio/src/tests/unit/local/datagram_protocol.cpp b/3rdparty/asio/src/tests/unit/local/datagram_protocol.cpp
index f685a8220a4..b73a67f02a2 100644
--- a/3rdparty/asio/src/tests/unit/local/datagram_protocol.cpp
+++ b/3rdparty/asio/src/tests/unit/local/datagram_protocol.cpp
@@ -2,7 +2,7 @@
// datagram_protocol.cpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2021 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)
@@ -52,6 +52,7 @@ void test()
try
{
io_context ioc;
+ const io_context::executor_type ioc_ex = ioc.get_executor();
char mutable_char_buffer[128] = "";
const char const_char_buffer[128] = "";
socket_base::message_flags in_flags = 0;
@@ -67,12 +68,13 @@ void test()
int native_socket1 = ::socket(AF_UNIX, SOCK_DGRAM, 0);
dp::socket socket4(ioc, dp(), native_socket1);
- // basic_io_object functions.
+ dp::socket socket5(ioc_ex);
+ dp::socket socket6(ioc_ex, dp());
+ dp::socket socket7(ioc_ex, dp::endpoint(""));
+ int native_socket2 = ::socket(AF_UNIX, SOCK_DGRAM, 0);
+ dp::socket socket8(ioc_ex, dp(), native_socket2);
-#if !defined(ASIO_NO_DEPRECATED)
- io_context& ioc_ref = socket1.get_io_context();
- (void)ioc_ref;
-#endif // !defined(ASIO_NO_DEPRECATED)
+ // basic_io_object functions.
dp::socket::executor_type ex = socket1.get_executor();
(void)ex;
@@ -85,10 +87,10 @@ void test()
socket1.open(dp());
socket1.open(dp(), ec);
- int native_socket2 = ::socket(AF_UNIX, SOCK_DGRAM, 0);
- socket1.assign(dp(), native_socket2);
int native_socket3 = ::socket(AF_UNIX, SOCK_DGRAM, 0);
- socket1.assign(dp(), native_socket3, ec);
+ socket1.assign(dp(), native_socket3);
+ int native_socket4 = ::socket(AF_UNIX, SOCK_DGRAM, 0);
+ socket1.assign(dp(), native_socket4, ec);
bool is_open = socket1.is_open();
(void)is_open;
@@ -96,8 +98,8 @@ void test()
socket1.close();
socket1.close(ec);
- dp::socket::native_handle_type native_socket4 = socket1.native_handle();
- (void)native_socket4;
+ dp::socket::native_handle_type native_socket5 = socket1.native_handle();
+ (void)native_socket5;
socket1.cancel();
socket1.cancel(ec);
@@ -130,10 +132,14 @@ void test()
socket1.io_control(io_control_command, ec);
dp::endpoint endpoint1 = socket1.local_endpoint();
+ (void)endpoint1;
dp::endpoint endpoint2 = socket1.local_endpoint(ec);
+ (void)endpoint2;
dp::endpoint endpoint3 = socket1.remote_endpoint();
+ (void)endpoint3;
dp::endpoint endpoint4 = socket1.remote_endpoint(ec);
+ (void)endpoint4;
socket1.shutdown(socket_base::shutdown_both);
socket1.shutdown(socket_base::shutdown_both, ec);