summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/asio/src/tests/unit/local/stream_protocol.cpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/asio/src/tests/unit/local/stream_protocol.cpp')
-rw-r--r--3rdparty/asio/src/tests/unit/local/stream_protocol.cpp28
1 files changed, 17 insertions, 11 deletions
diff --git a/3rdparty/asio/src/tests/unit/local/stream_protocol.cpp b/3rdparty/asio/src/tests/unit/local/stream_protocol.cpp
index c22ba410cdb..18a3f63c158 100644
--- a/3rdparty/asio/src/tests/unit/local/stream_protocol.cpp
+++ b/3rdparty/asio/src/tests/unit/local/stream_protocol.cpp
@@ -2,7 +2,7 @@
// stream_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)
@@ -60,6 +60,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;
@@ -75,12 +76,13 @@ void test()
int native_socket1 = ::socket(AF_UNIX, SOCK_STREAM, 0);
sp::socket socket4(ioc, sp(), native_socket1);
- // basic_io_object functions.
+ sp::socket socket5(ioc_ex);
+ sp::socket socket6(ioc_ex, sp());
+ sp::socket socket7(ioc_ex, sp::endpoint(""));
+ int native_socket2 = ::socket(AF_UNIX, SOCK_STREAM, 0);
+ sp::socket socket8(ioc_ex, sp(), 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.
sp::socket::executor_type ex = socket1.get_executor();
(void)ex;
@@ -93,10 +95,10 @@ void test()
socket1.open(sp());
socket1.open(sp(), ec);
- int native_socket2 = ::socket(AF_UNIX, SOCK_STREAM, 0);
- socket1.assign(sp(), native_socket2);
int native_socket3 = ::socket(AF_UNIX, SOCK_STREAM, 0);
- socket1.assign(sp(), native_socket3, ec);
+ socket1.assign(sp(), native_socket3);
+ int native_socket4 = ::socket(AF_UNIX, SOCK_STREAM, 0);
+ socket1.assign(sp(), native_socket4, ec);
bool is_open = socket1.is_open();
(void)is_open;
@@ -104,8 +106,8 @@ void test()
socket1.close();
socket1.close(ec);
- sp::socket::native_handle_type native_socket4 = socket1.native_handle();
- (void)native_socket4;
+ sp::socket::native_handle_type native_socket5 = socket1.native_handle();
+ (void)native_socket5;
socket1.cancel();
socket1.cancel(ec);
@@ -138,10 +140,14 @@ void test()
socket1.io_control(io_control_command, ec);
sp::endpoint endpoint1 = socket1.local_endpoint();
+ (void)endpoint1;
sp::endpoint endpoint2 = socket1.local_endpoint(ec);
+ (void)endpoint2;
sp::endpoint endpoint3 = socket1.remote_endpoint();
+ (void)endpoint3;
sp::endpoint endpoint4 = socket1.remote_endpoint(ec);
+ (void)endpoint4;
socket1.shutdown(socket_base::shutdown_both);
socket1.shutdown(socket_base::shutdown_both, ec);