summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/asio/include/asio/detail/win_iocp_serial_port_service.hpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/asio/include/asio/detail/win_iocp_serial_port_service.hpp')
-rw-r--r--3rdparty/asio/include/asio/detail/win_iocp_serial_port_service.hpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/3rdparty/asio/include/asio/detail/win_iocp_serial_port_service.hpp b/3rdparty/asio/include/asio/detail/win_iocp_serial_port_service.hpp
index 53856460c72..d1d9d8281ce 100644
--- a/3rdparty/asio/include/asio/detail/win_iocp_serial_port_service.hpp
+++ b/3rdparty/asio/include/asio/detail/win_iocp_serial_port_service.hpp
@@ -2,7 +2,7 @@
// detail/win_iocp_serial_port_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -22,7 +22,7 @@
#include <string>
#include "asio/error.hpp"
-#include "asio/io_context.hpp"
+#include "asio/execution_context.hpp"
#include "asio/detail/win_iocp_handle_service.hpp"
#include "asio/detail/push_options.hpp"
@@ -32,7 +32,7 @@ namespace detail {
// Extend win_iocp_handle_service to provide serial port support.
class win_iocp_serial_port_service :
- public service_base<win_iocp_serial_port_service>
+ public execution_context_service_base<win_iocp_serial_port_service>
{
public:
// The native type of a serial port.
@@ -42,8 +42,7 @@ public:
typedef win_iocp_handle_service::implementation_type implementation_type;
// Constructor.
- ASIO_DECL win_iocp_serial_port_service(
- asio::io_context& io_context);
+ ASIO_DECL win_iocp_serial_port_service(execution_context& context);
// Destroy all user-defined handler objects owned by the service.
ASIO_DECL void shutdown();
@@ -151,11 +150,12 @@ public:
// Start an asynchronous write. The data being written must be valid for the
// lifetime of the asynchronous operation.
- template <typename ConstBufferSequence, typename Handler>
+ template <typename ConstBufferSequence, typename Handler, typename IoExecutor>
void async_write_some(implementation_type& impl,
- const ConstBufferSequence& buffers, Handler& handler)
+ const ConstBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
{
- handle_service_.async_write_some(impl, buffers, handler);
+ handle_service_.async_write_some(impl, buffers, handler, io_ex);
}
// Read some data. Returns the number of bytes received.
@@ -168,11 +168,13 @@ public:
// Start an asynchronous read. The buffer for the data being received must be
// valid for the lifetime of the asynchronous operation.
- template <typename MutableBufferSequence, typename Handler>
+ template <typename MutableBufferSequence,
+ typename Handler, typename IoExecutor>
void async_read_some(implementation_type& impl,
- const MutableBufferSequence& buffers, Handler& handler)
+ const MutableBufferSequence& buffers,
+ Handler& handler, const IoExecutor& io_ex)
{
- handle_service_.async_read_some(impl, buffers, handler);
+ handle_service_.async_read_some(impl, buffers, handler, io_ex);
}
private: