diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2019-12-05 15:22:41 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2019-12-05 15:22:41 +0900 |
commit | 3c1df2168531ad5580076ae08d529054689aeedd (patch) | |
tree | 941aff6f86393eecacddfec252a8508c7e8351c9 /boost/asio/detail/reactive_serial_port_service.hpp | |
parent | d6a306e745acfee00e81ccaf3324a2a03516db41 (diff) | |
download | boost-3c1df2168531ad5580076ae08d529054689aeedd.tar.gz boost-3c1df2168531ad5580076ae08d529054689aeedd.tar.bz2 boost-3c1df2168531ad5580076ae08d529054689aeedd.zip |
Imported Upstream version 1.70.0upstream/1.70.0
Diffstat (limited to 'boost/asio/detail/reactive_serial_port_service.hpp')
-rw-r--r-- | boost/asio/detail/reactive_serial_port_service.hpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/boost/asio/detail/reactive_serial_port_service.hpp b/boost/asio/detail/reactive_serial_port_service.hpp index 42ff500d2c..ae752d06da 100644 --- a/boost/asio/detail/reactive_serial_port_service.hpp +++ b/boost/asio/detail/reactive_serial_port_service.hpp @@ -2,7 +2,7 @@ // detail/reactive_serial_port_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2019 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 @@ -23,7 +23,7 @@ #include <string> #include <boost/asio/error.hpp> -#include <boost/asio/io_context.hpp> +#include <boost/asio/execution_context.hpp> #include <boost/asio/serial_port_base.hpp> #include <boost/asio/detail/descriptor_ops.hpp> #include <boost/asio/detail/reactive_descriptor_service.hpp> @@ -36,7 +36,7 @@ namespace detail { // Extend reactive_descriptor_service to provide serial port support. class reactive_serial_port_service : - public service_base<reactive_serial_port_service> + public execution_context_service_base<reactive_serial_port_service> { public: // The native type of a serial port. @@ -45,8 +45,7 @@ public: // The implementation type of the serial port. typedef reactive_descriptor_service::implementation_type implementation_type; - BOOST_ASIO_DECL reactive_serial_port_service( - boost::asio::io_context& io_context); + BOOST_ASIO_DECL reactive_serial_port_service(execution_context& context); // Destroy all user-defined handler objects owned by the service. BOOST_ASIO_DECL void shutdown(); @@ -157,11 +156,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) { - descriptor_service_.async_write_some(impl, buffers, handler); + descriptor_service_.async_write_some(impl, buffers, handler, io_ex); } // Read some data. Returns the number of bytes received. @@ -174,11 +174,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) { - descriptor_service_.async_read_some(impl, buffers, handler); + descriptor_service_.async_read_some(impl, buffers, handler, io_ex); } private: |