Sha256: 443990bff38617eccb83b586a231587e92a41bfa97edbecc12c2e1dd6780210b

Contents?: true

Size: 1.51 KB

Versions: 24

Compression:

Stored size: 1.51 KB

Contents

//
// ssl/detail/write_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2020 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)
//

#ifndef ASIO_SSL_DETAIL_WRITE_OP_HPP
#define ASIO_SSL_DETAIL_WRITE_OP_HPP

#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)

#include "asio/detail/config.hpp"

#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/ssl/detail/engine.hpp"

#include "asio/detail/push_options.hpp"

namespace asio {
namespace ssl {
namespace detail {

template <typename ConstBufferSequence>
class write_op
{
public:
  write_op(const ConstBufferSequence& buffers)
    : buffers_(buffers)
  {
  }

  engine::want operator()(engine& eng,
      asio::error_code& ec,
      std::size_t& bytes_transferred) const
  {
    asio::const_buffer buffer =
      asio::detail::buffer_sequence_adapter<asio::const_buffer,
        ConstBufferSequence>::first(buffers_);

    return eng.write(buffer, ec, bytes_transferred);
  }

  template <typename Handler>
  void call_handler(Handler& handler,
      const asio::error_code& ec,
      const std::size_t& bytes_transferred) const
  {
    handler(ec, bytes_transferred);
  }

private:
  ConstBufferSequence buffers_;
};

} // namespace detail
} // namespace ssl
} // namespace asio

#include "asio/detail/pop_options.hpp"

#endif // ASIO_SSL_DETAIL_WRITE_OP_HPP

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
couchbase-3.0.0-universal-darwin-19 ext/third_party/asio/asio/include/asio/ssl/detail/write_op.hpp
couchbase-3.0.0 ext/third_party/asio/asio/include/asio/ssl/detail/write_op.hpp
couchbase-3.0.0.beta.1-universal-darwin-19 ext/third_party/asio/asio/include/asio/ssl/detail/write_op.hpp
couchbase-3.0.0.beta.1 ext/third_party/asio/asio/include/asio/ssl/detail/write_op.hpp
couchbase-3.0.0.alpha.5-x86_64-linux ext/third_party/asio/asio/include/asio/ssl/detail/write_op.hpp
couchbase-3.0.0.alpha.5-universal-darwin-19 ext/third_party/asio/asio/include/asio/ssl/detail/write_op.hpp
couchbase-3.0.0.alpha.5-x86_64-darwin-19 ext/third_party/asio/asio/include/asio/ssl/detail/write_op.hpp
couchbase-3.0.0.alpha.5 ext/third_party/asio/asio/include/asio/ssl/detail/write_op.hpp
couchbase-3.0.0.alpha.4-x86_64-linux ext/third_party/asio/asio/include/asio/ssl/detail/write_op.hpp
couchbase-3.0.0.alpha.4-x86_64-darwin-19 ext/third_party/asio/asio/include/asio/ssl/detail/write_op.hpp
couchbase-3.0.0.alpha.4-universal-darwin-19 ext/third_party/asio/asio/include/asio/ssl/detail/write_op.hpp
couchbase-3.0.0.alpha.4 ext/third_party/asio/asio/include/asio/ssl/detail/write_op.hpp
couchbase-3.0.0.alpha.3-x86_64-linux ext/third_party/asio/asio/include/asio/ssl/detail/write_op.hpp
couchbase-3.0.0.alpha.3-x86_64-darwin-19 ext/third_party/asio/asio/include/asio/ssl/detail/write_op.hpp
couchbase-3.0.0.alpha.3-universal-darwin-19 ext/third_party/asio/asio/include/asio/ssl/detail/write_op.hpp
couchbase-3.0.0.alpha.3 ext/third_party/asio/asio/include/asio/ssl/detail/write_op.hpp
couchbase-3.0.0.alpha.2-x86_64-linux ext/third_party/asio/asio/include/asio/ssl/detail/write_op.hpp
couchbase-3.0.0.alpha.2-x86_64-darwin-19 ext/third_party/asio/asio/include/asio/ssl/detail/write_op.hpp
couchbase-3.0.0.alpha.2-universal-darwin-19 ext/third_party/asio/asio/include/asio/ssl/detail/write_op.hpp
couchbase-3.0.0.alpha.2 ext/third_party/asio/asio/include/asio/ssl/detail/write_op.hpp