Realistic 3D camera system
3D camera system components
write_op.hpp
Go to the documentation of this file.
1 //
2 // ssl/detail/write_op.hpp
3 // ~~~~~~~~~~~~~~~~~~~~~~~
4 //
5 // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6 //
7 // Distributed under the Boost Software License, Version 1.0. (See accompanying
8 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9 //
10 
11 #ifndef ASIO_SSL_DETAIL_WRITE_OP_HPP
12 #define ASIO_SSL_DETAIL_WRITE_OP_HPP
13 
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
15 # pragma once
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17 
18 #include "asio/detail/config.hpp"
19 
20 #if !defined(ASIO_ENABLE_OLD_SSL)
23 #endif // !defined(ASIO_ENABLE_OLD_SSL)
24 
26 
27 namespace asio {
28 namespace ssl {
29 namespace detail {
30 
31 #if !defined(ASIO_ENABLE_OLD_SSL)
32 
33 template <typename ConstBufferSequence>
34 class write_op
35 {
36 public:
37  write_op(const ConstBufferSequence& buffers)
38  : buffers_(buffers)
39  {
40  }
41 
43  asio::error_code& ec,
44  std::size_t& bytes_transferred) const
45  {
48  ConstBufferSequence>::first(buffers_);
49 
50  return eng.write(buffer, ec, bytes_transferred);
51  }
52 
53  template <typename Handler>
54  void call_handler(Handler& handler,
55  const asio::error_code& ec,
56  const std::size_t& bytes_transferred) const
57  {
58  handler(ec, bytes_transferred);
59  }
60 
61 private:
62  ConstBufferSequence buffers_;
63 };
64 
65 #endif // !defined(ASIO_ENABLE_OLD_SSL)
66 
67 } // namespace detail
68 } // namespace ssl
69 } // namespace asio
70 
72 
73 #endif // ASIO_SSL_DETAIL_WRITE_OP_HPP
Holds a buffer that cannot be modified.
Definition: buffer.hpp:211
mutable_buffers_1 buffer(const mutable_buffer &b)
Create a new modifiable buffer from an existing buffer.
Definition: buffer.hpp:706
write_op(const ConstBufferSequence &buffers)
Definition: write_op.hpp:37
const MutableBufferSequence & buffers
Definition: read.hpp:521
engine::want operator()(engine &eng, asio::error_code &ec, std::size_t &bytes_transferred) const
Definition: write_op.hpp:42
Class to represent an error code value.
Definition: error_code.hpp:80
void call_handler(Handler &handler, const asio::error_code &ec, const std::size_t &bytes_transferred) const
Definition: write_op.hpp:54
ASIO_DECL want write(const asio::const_buffer &data, asio::error_code &ec, std::size_t &bytes_transferred)
Definition: engine.ipp:145