summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/Boost/src/boost/asio/windows')
-rw-r--r--3rdParty/Boost/src/boost/asio/windows/basic_handle.hpp94
-rw-r--r--3rdParty/Boost/src/boost/asio/windows/basic_object_handle.hpp177
-rw-r--r--3rdParty/Boost/src/boost/asio/windows/basic_random_access_handle.hpp96
-rw-r--r--3rdParty/Boost/src/boost/asio/windows/basic_stream_handle.hpp87
-rw-r--r--3rdParty/Boost/src/boost/asio/windows/object_handle.hpp40
-rw-r--r--3rdParty/Boost/src/boost/asio/windows/object_handle_service.hpp170
-rw-r--r--3rdParty/Boost/src/boost/asio/windows/overlapped_ptr.hpp12
-rw-r--r--3rdParty/Boost/src/boost/asio/windows/random_access_handle.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/windows/random_access_handle_service.hpp72
-rw-r--r--3rdParty/Boost/src/boost/asio/windows/stream_handle.hpp2
-rw-r--r--3rdParty/Boost/src/boost/asio/windows/stream_handle_service.hpp68
11 files changed, 718 insertions, 102 deletions
diff --git a/3rdParty/Boost/src/boost/asio/windows/basic_handle.hpp b/3rdParty/Boost/src/boost/asio/windows/basic_handle.hpp
index aedd79a..5169cae 100644
--- a/3rdParty/Boost/src/boost/asio/windows/basic_handle.hpp
+++ b/3rdParty/Boost/src/boost/asio/windows/basic_handle.hpp
@@ -2,7 +2,7 @@
// windows/basic_handle.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 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)
@@ -19,6 +19,7 @@
#if defined(BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) \
|| defined(BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE) \
+ || defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE) \
|| defined(GENERATING_DOCUMENTATION)
#include <boost/asio/basic_io_object.hpp>
@@ -45,8 +46,12 @@ class basic_handle
: public basic_io_object<HandleService>
{
public:
+ /// (Deprecated: Use native_handle_type.) The native representation of a
+ /// handle.
+ typedef typename HandleService::native_handle_type native_type;
+
/// The native representation of a handle.
- typedef typename HandleService::native_type native_type;
+ typedef typename HandleService::native_handle_type native_handle_type;
/// A basic_handle is always the lowest layer.
typedef basic_handle<HandleService> lowest_layer_type;
@@ -70,18 +75,51 @@ public:
* @param io_service The io_service object that the handle will use to
* dispatch handlers for any asynchronous operations performed on the handle.
*
- * @param native_handle A native handle.
+ * @param handle A native handle.
*
* @throws boost::system::system_error Thrown on failure.
*/
basic_handle(boost::asio::io_service& io_service,
- const native_type& native_handle)
+ const native_handle_type& handle)
: basic_io_object<HandleService>(io_service)
{
boost::system::error_code ec;
- this->service.assign(this->implementation, native_handle, ec);
- boost::asio::detail::throw_error(ec);
+ this->get_service().assign(this->get_implementation(), handle, ec);
+ boost::asio::detail::throw_error(ec, "assign");
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move-construct a basic_handle from another.
+ /**
+ * This constructor moves a handle from one object to another.
+ *
+ * @param other The other basic_handle object from which the move will occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_handle(io_service&) constructor.
+ */
+ basic_handle(basic_handle&& other)
+ : basic_io_object<HandleService>(
+ BOOST_ASIO_MOVE_CAST(basic_handle)(other))
+ {
+ }
+
+ /// Move-assign a basic_handle from another.
+ /**
+ * This assignment operator moves a handle from one object to another.
+ *
+ * @param other The other basic_handle object from which the move will occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_handle(io_service&) constructor.
+ */
+ basic_handle& operator=(basic_handle&& other)
+ {
+ basic_io_object<HandleService>::operator=(
+ BOOST_ASIO_MOVE_CAST(basic_handle)(other));
+ return *this;
}
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
/// Get a reference to the lowest layer.
/**
@@ -115,35 +153,35 @@ public:
/*
* This function opens the handle to hold an existing native handle.
*
- * @param native_handle A native handle.
+ * @param handle A native handle.
*
* @throws boost::system::system_error Thrown on failure.
*/
- void assign(const native_type& native_handle)
+ void assign(const native_handle_type& handle)
{
boost::system::error_code ec;
- this->service.assign(this->implementation, native_handle, ec);
- boost::asio::detail::throw_error(ec);
+ this->get_service().assign(this->get_implementation(), handle, ec);
+ boost::asio::detail::throw_error(ec, "assign");
}
/// Assign an existing native handle to the handle.
/*
* This function opens the handle to hold an existing native handle.
*
- * @param native_handle A native handle.
+ * @param handle A native handle.
*
* @param ec Set to indicate what error occurred, if any.
*/
- boost::system::error_code assign(const native_type& native_handle,
+ boost::system::error_code assign(const native_handle_type& handle,
boost::system::error_code& ec)
{
- return this->service.assign(this->implementation, native_handle, ec);
+ return this->get_service().assign(this->get_implementation(), handle, ec);
}
/// Determine whether the handle is open.
bool is_open() const
{
- return this->service.is_open(this->implementation);
+ return this->get_service().is_open(this->get_implementation());
}
/// Close the handle.
@@ -157,8 +195,8 @@ public:
void close()
{
boost::system::error_code ec;
- this->service.close(this->implementation, ec);
- boost::asio::detail::throw_error(ec);
+ this->get_service().close(this->get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "close");
}
/// Close the handle.
@@ -171,10 +209,10 @@ public:
*/
boost::system::error_code close(boost::system::error_code& ec)
{
- return this->service.close(this->implementation, ec);
+ return this->get_service().close(this->get_implementation(), ec);
}
- /// Get the native handle representation.
+ /// (Deprecated: Use native_handle().) Get the native handle representation.
/**
* This function may be used to obtain the underlying representation of the
* handle. This is intended to allow access to native handle functionality
@@ -182,7 +220,18 @@ public:
*/
native_type native()
{
- return this->service.native(this->implementation);
+ return this->get_service().native_handle(this->get_implementation());
+ }
+
+ /// Get the native handle representation.
+ /**
+ * This function may be used to obtain the underlying representation of the
+ * handle. This is intended to allow access to native handle functionality
+ * that is not otherwise provided.
+ */
+ native_handle_type native_handle()
+ {
+ return this->get_service().native_handle(this->get_implementation());
}
/// Cancel all asynchronous operations associated with the handle.
@@ -196,8 +245,8 @@ public:
void cancel()
{
boost::system::error_code ec;
- this->service.cancel(this->implementation, ec);
- boost::asio::detail::throw_error(ec);
+ this->get_service().cancel(this->get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "cancel");
}
/// Cancel all asynchronous operations associated with the handle.
@@ -210,7 +259,7 @@ public:
*/
boost::system::error_code cancel(boost::system::error_code& ec)
{
- return this->service.cancel(this->implementation, ec);
+ return this->get_service().cancel(this->get_implementation(), ec);
}
protected:
@@ -228,6 +277,7 @@ protected:
#endif // defined(BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
// || defined(BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE)
+ // || defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE)
// || defined(GENERATING_DOCUMENTATION)
#endif // BOOST_ASIO_WINDOWS_BASIC_HANDLE_HPP
diff --git a/3rdParty/Boost/src/boost/asio/windows/basic_object_handle.hpp b/3rdParty/Boost/src/boost/asio/windows/basic_object_handle.hpp
new file mode 100644
index 0000000..a94bb57
--- /dev/null
+++ b/3rdParty/Boost/src/boost/asio/windows/basic_object_handle.hpp
@@ -0,0 +1,177 @@
+//
+// windows/basic_object_handle.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
+//
+// 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)
+//
+
+#ifndef BOOST_ASIO_WINDOWS_BASIC_OBJECT_HANDLE_HPP
+#define BOOST_ASIO_WINDOWS_BASIC_OBJECT_HANDLE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+
+#if defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/windows/basic_handle.hpp>
+#include <boost/asio/windows/object_handle_service.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace windows {
+
+/// Provides object-oriented handle functionality.
+/**
+ * The windows::basic_object_handle class template provides asynchronous and
+ * blocking object-oriented handle functionality.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+template <typename ObjectHandleService = object_handle_service>
+class basic_object_handle
+ : public basic_handle<ObjectHandleService>
+{
+public:
+ /// The native representation of a handle.
+ typedef typename ObjectHandleService::native_handle_type native_handle_type;
+
+ /// Construct a basic_object_handle without opening it.
+ /**
+ * This constructor creates an object handle without opening it.
+ *
+ * @param io_service The io_service object that the object handle will use to
+ * dispatch handlers for any asynchronous operations performed on the handle.
+ */
+ explicit basic_object_handle(boost::asio::io_service& io_service)
+ : basic_handle<ObjectHandleService>(io_service)
+ {
+ }
+
+ /// Construct a basic_object_handle on an existing native handle.
+ /**
+ * This constructor creates an object handle object to hold an existing native
+ * handle.
+ *
+ * @param io_service The io_service object that the object handle will use to
+ * dispatch handlers for any asynchronous operations performed on the handle.
+ *
+ * @param native_handle The new underlying handle implementation.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ basic_object_handle(boost::asio::io_service& io_service,
+ const native_handle_type& native_handle)
+ : basic_handle<ObjectHandleService>(io_service, native_handle)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move-construct a basic_object_handle from another.
+ /**
+ * This constructor moves an object handle from one object to another.
+ *
+ * @param other The other basic_object_handle object from which the move will
+ * occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_object_handle(io_service&) constructor.
+ */
+ basic_object_handle(basic_object_handle&& other)
+ : basic_handle<ObjectHandleService>(
+ BOOST_ASIO_MOVE_CAST(basic_object_handle)(other))
+ {
+ }
+
+ /// Move-assign a basic_object_handle from another.
+ /**
+ * This assignment operator moves an object handle from one object to another.
+ *
+ * @param other The other basic_object_handle object from which the move will
+ * occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_object_handle(io_service&) constructor.
+ */
+ basic_object_handle& operator=(basic_object_handle&& other)
+ {
+ basic_handle<ObjectHandleService>::operator=(
+ BOOST_ASIO_MOVE_CAST(basic_object_handle)(other));
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Perform a blocking wait on the object handle.
+ /**
+ * This function is used to wait for the object handle to be set to the
+ * signalled state. This function blocks and does not return until the object
+ * handle has been set to the signalled state.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ void wait()
+ {
+ boost::system::error_code ec;
+ this->get_service().wait(this->get_implementation(), ec);
+ boost::asio::detail::throw_error(ec, "wait");
+ }
+
+ /// Perform a blocking wait on the object handle.
+ /**
+ * This function is used to wait for the object handle to be set to the
+ * signalled state. This function blocks and does not return until the object
+ * handle has been set to the signalled state.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ void wait(boost::system::error_code& ec)
+ {
+ this->get_service().wait(this->get_implementation(), ec);
+ }
+
+ /// Start an asynchronous wait on the object handle.
+ /**
+ * This function is be used to initiate an asynchronous wait against the
+ * object handle. It always returns immediately.
+ *
+ * @param handler The handler to be called when the object handle is set to
+ * the signalled state. Copies will be made of the handler as required. The
+ * function signature of the handler must be:
+ * @code void handler(
+ * const boost::system::error_code& error // Result of operation.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation
+ * of the handler will be performed in a manner equivalent to using
+ * boost::asio::io_service::post().
+ */
+ template <typename WaitHandler>
+ void async_wait(WaitHandler handler)
+ {
+ this->get_service().async_wait(this->get_implementation(), handler);
+ }
+};
+
+} // namespace windows
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_WINDOWS_BASIC_OBJECT_HANDLE_HPP
diff --git a/3rdParty/Boost/src/boost/asio/windows/basic_random_access_handle.hpp b/3rdParty/Boost/src/boost/asio/windows/basic_random_access_handle.hpp
index 207e414..0d57141 100644
--- a/3rdParty/Boost/src/boost/asio/windows/basic_random_access_handle.hpp
+++ b/3rdParty/Boost/src/boost/asio/windows/basic_random_access_handle.hpp
@@ -2,7 +2,7 @@
// windows/basic_random_access_handle.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 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)
@@ -21,6 +21,7 @@
|| defined(GENERATING_DOCUMENTATION)
#include <cstddef>
+#include <boost/asio/detail/handler_type_requirements.hpp>
#include <boost/asio/detail/throw_error.hpp>
#include <boost/asio/error.hpp>
#include <boost/asio/windows/basic_handle.hpp>
@@ -46,8 +47,13 @@ class basic_random_access_handle
: public basic_handle<RandomAccessHandleService>
{
public:
+ /// (Deprecated: Use native_handle_type.) The native representation of a
+ /// handle.
+ typedef typename RandomAccessHandleService::native_handle_type native_type;
+
/// The native representation of a handle.
- typedef typename RandomAccessHandleService::native_type native_type;
+ typedef typename RandomAccessHandleService::native_handle_type
+ native_handle_type;
/// Construct a basic_random_access_handle without opening it.
/**
@@ -72,16 +78,54 @@ public:
* use to dispatch handlers for any asynchronous operations performed on the
* handle.
*
- * @param native_handle The new underlying handle implementation.
+ * @param handle The new underlying handle implementation.
*
* @throws boost::system::system_error Thrown on failure.
*/
basic_random_access_handle(boost::asio::io_service& io_service,
- const native_type& native_handle)
- : basic_handle<RandomAccessHandleService>(io_service, native_handle)
+ const native_handle_type& handle)
+ : basic_handle<RandomAccessHandleService>(io_service, handle)
{
}
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move-construct a basic_random_access_handle from another.
+ /**
+ * This constructor moves a random-access handle from one object to another.
+ *
+ * @param other The other basic_random_access_handle object from which the
+ * move will occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_random_access_handle(io_service&)
+ * constructor.
+ */
+ basic_random_access_handle(basic_random_access_handle&& other)
+ : basic_handle<RandomAccessHandleService>(
+ BOOST_ASIO_MOVE_CAST(basic_random_access_handle)(other))
+ {
+ }
+
+ /// Move-assign a basic_random_access_handle from another.
+ /**
+ * This assignment operator moves a random-access handle from one object to
+ * another.
+ *
+ * @param other The other basic_random_access_handle object from which the
+ * move will occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_random_access_handle(io_service&)
+ * constructor.
+ */
+ basic_random_access_handle& operator=(basic_random_access_handle&& other)
+ {
+ basic_handle<RandomAccessHandleService>::operator=(
+ BOOST_ASIO_MOVE_CAST(basic_random_access_handle)(other));
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
/// Write some data to the handle at the specified offset.
/**
* This function is used to write data to the random-access handle. The
@@ -116,9 +160,9 @@ public:
const ConstBufferSequence& buffers)
{
boost::system::error_code ec;
- std::size_t s = this->service.write_some_at(
- this->implementation, offset, buffers, ec);
- boost::asio::detail::throw_error(ec);
+ std::size_t s = this->get_service().write_some_at(
+ this->get_implementation(), offset, buffers, ec);
+ boost::asio::detail::throw_error(ec, "write_some_at");
return s;
}
@@ -144,8 +188,8 @@ public:
std::size_t write_some_at(boost::uint64_t offset,
const ConstBufferSequence& buffers, boost::system::error_code& ec)
{
- return this->service.write_some_at(
- this->implementation, offset, buffers, ec);
+ return this->get_service().write_some_at(
+ this->get_implementation(), offset, buffers, ec);
}
/// Start an asynchronous write at the specified offset.
@@ -187,10 +231,15 @@ public:
*/
template <typename ConstBufferSequence, typename WriteHandler>
void async_write_some_at(boost::uint64_t offset,
- const ConstBufferSequence& buffers, WriteHandler handler)
+ const ConstBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
{
- this->service.async_write_some_at(
- this->implementation, offset, buffers, handler);
+ // If you get an error on the following line it means that your handler does
+ // not meet the documented type requirements for a WriteHandler.
+ BOOST_ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+ this->get_service().async_write_some_at(this->get_implementation(),
+ offset, buffers, BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
}
/// Read some data from the handle at the specified offset.
@@ -228,9 +277,9 @@ public:
const MutableBufferSequence& buffers)
{
boost::system::error_code ec;
- std::size_t s = this->service.read_some_at(
- this->implementation, offset, buffers, ec);
- boost::asio::detail::throw_error(ec);
+ std::size_t s = this->get_service().read_some_at(
+ this->get_implementation(), offset, buffers, ec);
+ boost::asio::detail::throw_error(ec, "read_some_at");
return s;
}
@@ -257,8 +306,8 @@ public:
std::size_t read_some_at(boost::uint64_t offset,
const MutableBufferSequence& buffers, boost::system::error_code& ec)
{
- return this->service.read_some_at(
- this->implementation, offset, buffers, ec);
+ return this->get_service().read_some_at(
+ this->get_implementation(), offset, buffers, ec);
}
/// Start an asynchronous read at the specified offset.
@@ -301,10 +350,15 @@ public:
*/
template <typename MutableBufferSequence, typename ReadHandler>
void async_read_some_at(boost::uint64_t offset,
- const MutableBufferSequence& buffers, ReadHandler handler)
+ const MutableBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
{
- this->service.async_read_some_at(
- this->implementation, offset, buffers, handler);
+ // If you get an error on the following line it means that your handler does
+ // not meet the documented type requirements for a ReadHandler.
+ BOOST_ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ this->get_service().async_read_some_at(this->get_implementation(),
+ offset, buffers, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
}
};
diff --git a/3rdParty/Boost/src/boost/asio/windows/basic_stream_handle.hpp b/3rdParty/Boost/src/boost/asio/windows/basic_stream_handle.hpp
index 105b041..ccc8f09 100644
--- a/3rdParty/Boost/src/boost/asio/windows/basic_stream_handle.hpp
+++ b/3rdParty/Boost/src/boost/asio/windows/basic_stream_handle.hpp
@@ -2,7 +2,7 @@
// windows/basic_stream_handle.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 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)
@@ -21,10 +21,11 @@
|| defined(GENERATING_DOCUMENTATION)
#include <cstddef>
+#include <boost/asio/detail/handler_type_requirements.hpp>
+#include <boost/asio/detail/throw_error.hpp>
#include <boost/asio/error.hpp>
#include <boost/asio/windows/basic_handle.hpp>
#include <boost/asio/windows/stream_handle_service.hpp>
-#include <boost/asio/detail/throw_error.hpp>
#include <boost/asio/detail/push_options.hpp>
@@ -49,8 +50,12 @@ class basic_stream_handle
: public basic_handle<StreamHandleService>
{
public:
+ /// (Deprecated: Use native_handle_type.) The native representation of a
+ /// handle.
+ typedef typename StreamHandleService::native_handle_type native_type;
+
/// The native representation of a handle.
- typedef typename StreamHandleService::native_type native_type;
+ typedef typename StreamHandleService::native_handle_type native_handle_type;
/// Construct a basic_stream_handle without opening it.
/**
@@ -74,16 +79,52 @@ public:
* @param io_service The io_service object that the stream handle will use to
* dispatch handlers for any asynchronous operations performed on the handle.
*
- * @param native_handle The new underlying handle implementation.
+ * @param handle The new underlying handle implementation.
*
* @throws boost::system::system_error Thrown on failure.
*/
basic_stream_handle(boost::asio::io_service& io_service,
- const native_type& native_handle)
- : basic_handle<StreamHandleService>(io_service, native_handle)
+ const native_handle_type& handle)
+ : basic_handle<StreamHandleService>(io_service, handle)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move-construct a basic_stream_handle from another.
+ /**
+ * This constructor moves a stream handle from one object to another.
+ *
+ * @param other The other basic_stream_handle object from which the move
+ * will occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_stream_handle(io_service&) constructor.
+ */
+ basic_stream_handle(basic_stream_handle&& other)
+ : basic_handle<StreamHandleService>(
+ BOOST_ASIO_MOVE_CAST(basic_stream_handle)(other))
{
}
+ /// Move-assign a basic_stream_handle from another.
+ /**
+ * This assignment operator moves a stream handle from one object to
+ * another.
+ *
+ * @param other The other basic_stream_handle object from which the move
+ * will occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_stream_handle(io_service&) constructor.
+ */
+ basic_stream_handle& operator=(basic_stream_handle&& other)
+ {
+ basic_handle<StreamHandleService>::operator=(
+ BOOST_ASIO_MOVE_CAST(basic_stream_handle)(other));
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
/// Write some data to the handle.
/**
* This function is used to write data to the stream handle. The function call
@@ -115,8 +156,9 @@ public:
std::size_t write_some(const ConstBufferSequence& buffers)
{
boost::system::error_code ec;
- std::size_t s = this->service.write_some(this->implementation, buffers, ec);
- boost::asio::detail::throw_error(ec);
+ std::size_t s = this->get_service().write_some(
+ this->get_implementation(), buffers, ec);
+ boost::asio::detail::throw_error(ec, "write_some");
return s;
}
@@ -140,7 +182,8 @@ public:
std::size_t write_some(const ConstBufferSequence& buffers,
boost::system::error_code& ec)
{
- return this->service.write_some(this->implementation, buffers, ec);
+ return this->get_service().write_some(
+ this->get_implementation(), buffers, ec);
}
/// Start an asynchronous write.
@@ -180,9 +223,14 @@ public:
*/
template <typename ConstBufferSequence, typename WriteHandler>
void async_write_some(const ConstBufferSequence& buffers,
- WriteHandler handler)
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
{
- this->service.async_write_some(this->implementation, buffers, handler);
+ // If you get an error on the following line it means that your handler does
+ // not meet the documented type requirements for a WriteHandler.
+ BOOST_ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+ this->get_service().async_write_some(this->get_implementation(),
+ buffers, BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
}
/// Read some data from the handle.
@@ -217,8 +265,9 @@ public:
std::size_t read_some(const MutableBufferSequence& buffers)
{
boost::system::error_code ec;
- std::size_t s = this->service.read_some(this->implementation, buffers, ec);
- boost::asio::detail::throw_error(ec);
+ std::size_t s = this->get_service().read_some(
+ this->get_implementation(), buffers, ec);
+ boost::asio::detail::throw_error(ec, "read_some");
return s;
}
@@ -243,7 +292,8 @@ public:
std::size_t read_some(const MutableBufferSequence& buffers,
boost::system::error_code& ec)
{
- return this->service.read_some(this->implementation, buffers, ec);
+ return this->get_service().read_some(
+ this->get_implementation(), buffers, ec);
}
/// Start an asynchronous read.
@@ -284,9 +334,14 @@ public:
*/
template <typename MutableBufferSequence, typename ReadHandler>
void async_read_some(const MutableBufferSequence& buffers,
- ReadHandler handler)
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
{
- this->service.async_read_some(this->implementation, buffers, handler);
+ // If you get an error on the following line it means that your handler does
+ // not meet the documented type requirements for a ReadHandler.
+ BOOST_ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ this->get_service().async_read_some(this->get_implementation(),
+ buffers, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
}
};
diff --git a/3rdParty/Boost/src/boost/asio/windows/object_handle.hpp b/3rdParty/Boost/src/boost/asio/windows/object_handle.hpp
new file mode 100644
index 0000000..7bf0654
--- /dev/null
+++ b/3rdParty/Boost/src/boost/asio/windows/object_handle.hpp
@@ -0,0 +1,40 @@
+//
+// windows/object_handle.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
+//
+// 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)
+//
+
+#ifndef BOOST_ASIO_WINDOWS_OBJECT_HANDLE_HPP
+#define BOOST_ASIO_WINDOWS_OBJECT_HANDLE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+
+#if defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <boost/asio/windows/basic_object_handle.hpp>
+
+namespace boost {
+namespace asio {
+namespace windows {
+
+/// Typedef for the typical usage of an object handle.
+typedef basic_object_handle<> object_handle;
+
+} // namespace windows
+} // namespace asio
+} // namespace boost
+
+#endif // defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_WINDOWS_OBJECT_HANDLE_HPP
diff --git a/3rdParty/Boost/src/boost/asio/windows/object_handle_service.hpp b/3rdParty/Boost/src/boost/asio/windows/object_handle_service.hpp
new file mode 100644
index 0000000..ffc89e6
--- /dev/null
+++ b/3rdParty/Boost/src/boost/asio/windows/object_handle_service.hpp
@@ -0,0 +1,170 @@
+//
+// windows/object_handle_service.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
+//
+// 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)
+//
+
+#ifndef BOOST_ASIO_WINDOWS_OBJECT_HANDLE_SERVICE_HPP
+#define BOOST_ASIO_WINDOWS_OBJECT_HANDLE_SERVICE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+
+#if defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <boost/asio/detail/win_object_handle_service.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/io_service.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace windows {
+
+/// Default service implementation for an object handle.
+class object_handle_service
+#if defined(GENERATING_DOCUMENTATION)
+ : public boost::asio::io_service::service
+#else
+ : public boost::asio::detail::service_base<object_handle_service>
+#endif
+{
+public:
+#if defined(GENERATING_DOCUMENTATION)
+ /// The unique service identifier.
+ static boost::asio::io_service::id id;
+#endif
+
+private:
+ // The type of the platform-specific implementation.
+ typedef detail::win_object_handle_service service_impl_type;
+
+public:
+ /// The type of an object handle implementation.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined implementation_type;
+#else
+ typedef service_impl_type::implementation_type implementation_type;
+#endif
+
+ /// The native handle type.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#else
+ typedef service_impl_type::native_handle_type native_handle_type;
+#endif
+
+ /// Construct a new object handle service for the specified io_service.
+ explicit object_handle_service(boost::asio::io_service& io_service)
+ : boost::asio::detail::service_base<object_handle_service>(io_service),
+ service_impl_(io_service)
+ {
+ }
+
+ /// Construct a new object handle implementation.
+ void construct(implementation_type& impl)
+ {
+ service_impl_.construct(impl);
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move-construct a new object handle implementation.
+ void move_construct(implementation_type& impl,
+ implementation_type& other_impl)
+ {
+ service_impl_.move_construct(impl, other_impl);
+ }
+
+ /// Move-assign from another object handle implementation.
+ void move_assign(implementation_type& impl,
+ object_handle_service& other_service,
+ implementation_type& other_impl)
+ {
+ service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Destroy an object handle implementation.
+ void destroy(implementation_type& impl)
+ {
+ service_impl_.destroy(impl);
+ }
+
+ /// Assign an existing native handle to an object handle.
+ boost::system::error_code assign(implementation_type& impl,
+ const native_handle_type& handle, boost::system::error_code& ec)
+ {
+ return service_impl_.assign(impl, handle, ec);
+ }
+
+ /// Determine whether the handle is open.
+ bool is_open(const implementation_type& impl) const
+ {
+ return service_impl_.is_open(impl);
+ }
+
+ /// Close an object handle implementation.
+ boost::system::error_code close(implementation_type& impl,
+ boost::system::error_code& ec)
+ {
+ return service_impl_.close(impl, ec);
+ }
+
+ /// Get the native handle implementation.
+ native_handle_type native_handle(implementation_type& impl)
+ {
+ return service_impl_.native_handle(impl);
+ }
+
+ /// Cancel all asynchronous operations associated with the handle.
+ boost::system::error_code cancel(implementation_type& impl,
+ boost::system::error_code& ec)
+ {
+ return service_impl_.cancel(impl, ec);
+ }
+
+ // Wait for a signaled state.
+ void wait(implementation_type& impl, boost::system::error_code& ec)
+ {
+ service_impl_.wait(impl, ec);
+ }
+
+ /// Start an asynchronous wait.
+ template <typename WaitHandler>
+ void async_wait(implementation_type& impl,
+ BOOST_ASIO_MOVE_ARG(WaitHandler) handler)
+ {
+ service_impl_.async_wait(impl, BOOST_ASIO_MOVE_CAST(WaitHandler)(handler));
+ }
+
+private:
+ // Destroy all user-defined handler objects owned by the service.
+ void shutdown_service()
+ {
+ service_impl_.shutdown_service();
+ }
+
+ // The platform-specific implementation.
+ service_impl_type service_impl_;
+};
+
+} // namespace windows
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_WINDOWS_OBJECT_HANDLE_SERVICE_HPP
diff --git a/3rdParty/Boost/src/boost/asio/windows/overlapped_ptr.hpp b/3rdParty/Boost/src/boost/asio/windows/overlapped_ptr.hpp
index c9b1889..94f9842 100644
--- a/3rdParty/Boost/src/boost/asio/windows/overlapped_ptr.hpp
+++ b/3rdParty/Boost/src/boost/asio/windows/overlapped_ptr.hpp
@@ -2,7 +2,7 @@
// windows/overlapped_ptr.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 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)
@@ -51,8 +51,9 @@ public:
/// Construct an overlapped_ptr to contain the specified handler.
template <typename Handler>
- explicit overlapped_ptr(boost::asio::io_service& io_service, Handler handler)
- : impl_(io_service, handler)
+ explicit overlapped_ptr(boost::asio::io_service& io_service,
+ BOOST_ASIO_MOVE_ARG(Handler) handler)
+ : impl_(io_service, BOOST_ASIO_MOVE_CAST(Handler)(handler))
{
}
@@ -70,9 +71,10 @@ public:
/// Reset to contain the specified handler, freeing any current OVERLAPPED
/// object.
template <typename Handler>
- void reset(boost::asio::io_service& io_service, Handler handler)
+ void reset(boost::asio::io_service& io_service,
+ BOOST_ASIO_MOVE_ARG(Handler) handler)
{
- impl_.reset(io_service, handler);
+ impl_.reset(io_service, BOOST_ASIO_MOVE_CAST(Handler)(handler));
}
/// Get the contained OVERLAPPED object.
diff --git a/3rdParty/Boost/src/boost/asio/windows/random_access_handle.hpp b/3rdParty/Boost/src/boost/asio/windows/random_access_handle.hpp
index 183ad0d..61fe1aa 100644
--- a/3rdParty/Boost/src/boost/asio/windows/random_access_handle.hpp
+++ b/3rdParty/Boost/src/boost/asio/windows/random_access_handle.hpp
@@ -2,7 +2,7 @@
// windows/random_access_handle.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 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)
diff --git a/3rdParty/Boost/src/boost/asio/windows/random_access_handle_service.hpp b/3rdParty/Boost/src/boost/asio/windows/random_access_handle_service.hpp
index 08cb561..9b5e456 100644
--- a/3rdParty/Boost/src/boost/asio/windows/random_access_handle_service.hpp
+++ b/3rdParty/Boost/src/boost/asio/windows/random_access_handle_service.hpp
@@ -2,7 +2,7 @@
// windows/random_access_handle_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 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)
@@ -59,11 +59,18 @@ public:
typedef service_impl_type::implementation_type implementation_type;
#endif
- /// The native handle type.
+ /// (Deprecated: Use native_handle_type.) The native handle type.
#if defined(GENERATING_DOCUMENTATION)
typedef implementation_defined native_type;
#else
- typedef service_impl_type::native_type native_type;
+ typedef service_impl_type::native_handle_type native_type;
+#endif
+
+ /// The native handle type.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#else
+ typedef service_impl_type::native_handle_type native_handle_type;
#endif
/// Construct a new random-access handle service for the specified io_service.
@@ -74,18 +81,29 @@ public:
{
}
- /// Destroy all user-defined handler objects owned by the service.
- void shutdown_service()
- {
- service_impl_.shutdown_service();
- }
-
/// Construct a new random-access handle implementation.
void construct(implementation_type& impl)
{
service_impl_.construct(impl);
}
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move-construct a new random-access handle implementation.
+ void move_construct(implementation_type& impl,
+ implementation_type& other_impl)
+ {
+ service_impl_.move_construct(impl, other_impl);
+ }
+
+ /// Move-assign from another random-access handle implementation.
+ void move_assign(implementation_type& impl,
+ random_access_handle_service& other_service,
+ implementation_type& other_impl)
+ {
+ service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
/// Destroy a random-access handle implementation.
void destroy(implementation_type& impl)
{
@@ -94,9 +112,9 @@ public:
/// Assign an existing native handle to a random-access handle.
boost::system::error_code assign(implementation_type& impl,
- const native_type& native_handle, boost::system::error_code& ec)
+ const native_handle_type& handle, boost::system::error_code& ec)
{
- return service_impl_.assign(impl, native_handle, ec);
+ return service_impl_.assign(impl, handle, ec);
}
/// Determine whether the handle is open.
@@ -112,10 +130,16 @@ public:
return service_impl_.close(impl, ec);
}
- /// Get the native handle implementation.
+ /// (Deprecated: Use native_handle().) Get the native handle implementation.
native_type native(implementation_type& impl)
{
- return service_impl_.native(impl);
+ return service_impl_.native_handle(impl);
+ }
+
+ /// Get the native handle implementation.
+ native_handle_type native_handle(implementation_type& impl)
+ {
+ return service_impl_.native_handle(impl);
}
/// Cancel all asynchronous operations associated with the handle.
@@ -135,10 +159,12 @@ public:
/// Start an asynchronous write at the specified offset.
template <typename ConstBufferSequence, typename WriteHandler>
- void async_write_some_at(implementation_type& impl, boost::uint64_t offset,
- const ConstBufferSequence& buffers, WriteHandler handler)
+ void async_write_some_at(implementation_type& impl,
+ boost::uint64_t offset, const ConstBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
{
- service_impl_.async_write_some_at(impl, offset, buffers, handler);
+ service_impl_.async_write_some_at(impl, offset, buffers,
+ BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
}
/// Read some data from the specified offset.
@@ -151,13 +177,21 @@ public:
/// Start an asynchronous read at the specified offset.
template <typename MutableBufferSequence, typename ReadHandler>
- void async_read_some_at(implementation_type& impl, boost::uint64_t offset,
- const MutableBufferSequence& buffers, ReadHandler handler)
+ void async_read_some_at(implementation_type& impl,
+ boost::uint64_t offset, const MutableBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
{
- service_impl_.async_read_some_at(impl, offset, buffers, handler);
+ service_impl_.async_read_some_at(impl, offset, buffers,
+ BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
}
private:
+ // Destroy all user-defined handler objects owned by the service.
+ void shutdown_service()
+ {
+ service_impl_.shutdown_service();
+ }
+
// The platform-specific implementation.
service_impl_type service_impl_;
};
diff --git a/3rdParty/Boost/src/boost/asio/windows/stream_handle.hpp b/3rdParty/Boost/src/boost/asio/windows/stream_handle.hpp
index 67f6452..7d829db 100644
--- a/3rdParty/Boost/src/boost/asio/windows/stream_handle.hpp
+++ b/3rdParty/Boost/src/boost/asio/windows/stream_handle.hpp
@@ -2,7 +2,7 @@
// windows/stream_handle.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 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)
diff --git a/3rdParty/Boost/src/boost/asio/windows/stream_handle_service.hpp b/3rdParty/Boost/src/boost/asio/windows/stream_handle_service.hpp
index 418ea1e..7d0ec9c 100644
--- a/3rdParty/Boost/src/boost/asio/windows/stream_handle_service.hpp
+++ b/3rdParty/Boost/src/boost/asio/windows/stream_handle_service.hpp
@@ -2,7 +2,7 @@
// windows/stream_handle_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 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)
@@ -57,11 +57,18 @@ public:
typedef service_impl_type::implementation_type implementation_type;
#endif
- /// The native handle type.
+ /// (Deprecated: Use native_handle_type.) The native handle type.
#if defined(GENERATING_DOCUMENTATION)
typedef implementation_defined native_type;
#else
- typedef service_impl_type::native_type native_type;
+ typedef service_impl_type::native_handle_type native_type;
+#endif
+
+ /// The native handle type.
+#if defined(GENERATING_DOCUMENTATION)
+ typedef implementation_defined native_handle_type;
+#else
+ typedef service_impl_type::native_handle_type native_handle_type;
#endif
/// Construct a new stream handle service for the specified io_service.
@@ -71,18 +78,29 @@ public:
{
}
- /// Destroy all user-defined handler objects owned by the service.
- void shutdown_service()
- {
- service_impl_.shutdown_service();
- }
-
/// Construct a new stream handle implementation.
void construct(implementation_type& impl)
{
service_impl_.construct(impl);
}
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move-construct a new stream handle implementation.
+ void move_construct(implementation_type& impl,
+ implementation_type& other_impl)
+ {
+ service_impl_.move_construct(impl, other_impl);
+ }
+
+ /// Move-assign from another stream handle implementation.
+ void move_assign(implementation_type& impl,
+ stream_handle_service& other_service,
+ implementation_type& other_impl)
+ {
+ service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
/// Destroy a stream handle implementation.
void destroy(implementation_type& impl)
{
@@ -91,9 +109,9 @@ public:
/// Assign an existing native handle to a stream handle.
boost::system::error_code assign(implementation_type& impl,
- const native_type& native_handle, boost::system::error_code& ec)
+ const native_handle_type& handle, boost::system::error_code& ec)
{
- return service_impl_.assign(impl, native_handle, ec);
+ return service_impl_.assign(impl, handle, ec);
}
/// Determine whether the handle is open.
@@ -109,10 +127,16 @@ public:
return service_impl_.close(impl, ec);
}
- /// Get the native handle implementation.
+ /// (Deprecated: Use native_handle().) Get the native handle implementation.
native_type native(implementation_type& impl)
{
- return service_impl_.native(impl);
+ return service_impl_.native_handle(impl);
+ }
+
+ /// Get the native handle implementation.
+ native_handle_type native_handle(implementation_type& impl)
+ {
+ return service_impl_.native_handle(impl);
}
/// Cancel all asynchronous operations associated with the handle.
@@ -133,9 +157,11 @@ public:
/// Start an asynchronous write.
template <typename ConstBufferSequence, typename WriteHandler>
void async_write_some(implementation_type& impl,
- const ConstBufferSequence& buffers, WriteHandler handler)
+ const ConstBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
{
- service_impl_.async_write_some(impl, buffers, handler);
+ service_impl_.async_write_some(impl, buffers,
+ BOOST_ASIO_MOVE_CAST(WriteHandler)(handler));
}
/// Read some data from the stream.
@@ -149,12 +175,20 @@ public:
/// Start an asynchronous read.
template <typename MutableBufferSequence, typename ReadHandler>
void async_read_some(implementation_type& impl,
- const MutableBufferSequence& buffers, ReadHandler handler)
+ const MutableBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
{
- service_impl_.async_read_some(impl, buffers, handler);
+ service_impl_.async_read_some(impl, buffers,
+ BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
}
private:
+ // Destroy all user-defined handler objects owned by the service.
+ void shutdown_service()
+ {
+ service_impl_.shutdown_service();
+ }
+
// The platform-specific implementation.
service_impl_type service_impl_;
};