Exemplo n.º 1
0
inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers)
{
  boost::system::error_code ec;
  std::size_t bytes_transferred = write(s, buffers, transfer_all(), ec);
  boost::asio::detail::throw_error(ec, "write");
  return bytes_transferred;
}
Exemplo n.º 2
0
inline std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers)
{
  asio::error_code ec;
  std::size_t bytes_transferred = read(s, buffers, transfer_all(), ec);
  asio::detail::throw_error(ec, "read");
  return bytes_transferred;
}
Exemplo n.º 3
0
inline std::size_t write(SyncWriteStream& s,
    boost::asio::basic_streambuf<Allocator>& b)
{
  boost::system::error_code ec;
  std::size_t bytes_transferred = write(s, b, transfer_all(), ec);
  boost::asio::detail::throw_error(ec, "write");
  return bytes_transferred;
}
Exemplo n.º 4
0
inline std::size_t write_at(SyncRandomAccessWriteDevice& d,
    lslboost::uint64_t offset, lslboost::asio::basic_streambuf<Allocator>& b)
{
  lslboost::system::error_code ec;
  std::size_t bytes_transferred = write_at(d, offset, b, transfer_all(), ec);
  lslboost::asio::detail::throw_error(ec, "write_at");
  return bytes_transferred;
}
Exemplo n.º 5
0
Arquivo: write.hpp Projeto: damu/asio
inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
    asio::error_code& ec,
    typename enable_if<
      is_const_buffer_sequence<ConstBufferSequence>::value
    >::type*)
{
  return write(s, buffers, transfer_all(), ec);
}
Exemplo n.º 6
0
std::size_t buffered_write_stream<Stream>::flush(asio::error_code& ec)
{
  std::size_t bytes_written = write(next_layer_,
      buffer(storage_.data(), storage_.size()),
      transfer_all(), ec);
  storage_.consume(bytes_written);
  return bytes_written;
}
Exemplo n.º 7
0
inline std::size_t read(SyncReadStream& s,
    asio::basic_streambuf<Allocator>& b)
{
  asio::error_code ec;
  std::size_t bytes_transferred = read(s, b, transfer_all(), ec);
  asio::detail::throw_error(ec, "read");
  return bytes_transferred;
}
Exemplo n.º 8
0
inline std::size_t read_at(SyncRandomAccessReadDevice& d,
    boost::uint64_t offset, asio::basic_streambuf<Allocator>& b)
{
  asio::error_code ec;
  std::size_t bytes_transferred = read_at(
      d, offset, b, transfer_all(), ec);
  asio::detail::throw_error(ec, "read_at");
  return bytes_transferred;
}
Exemplo n.º 9
0
inline std::size_t read_at(SyncRandomAccessReadDevice& d,
    uint64_t offset, const MutableBufferSequence& buffers)
{
  lslboost::system::error_code ec;
  std::size_t bytes_transferred = read_at(
      d, offset, buffers, transfer_all(), ec);
  lslboost::asio::detail::throw_error(ec, "read_at");
  return bytes_transferred;
}
Exemplo n.º 10
0
inline std::size_t write_at(SyncRandomAccessWriteDevice& d,
    lslboost::uint64_t offset, const ConstBufferSequence& buffers)
{
  lslboost::system::error_code ec;
  std::size_t bytes_transferred = write_at(
      d, offset, buffers, transfer_all(), ec);
  lslboost::asio::detail::throw_error(ec, "write_at");
  return bytes_transferred;
}
Exemplo n.º 11
0
Arquivo: write.hpp Projeto: damu/asio
inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
    typename enable_if<
      is_const_buffer_sequence<ConstBufferSequence>::value
    >::type*)
{
  asio::error_code ec;
  std::size_t bytes_transferred = write(s, buffers, transfer_all(), ec);
  asio::detail::throw_error(ec, "write");
  return bytes_transferred;
}
Exemplo n.º 12
0
inline void async_write(AsyncWriteStream& s,
    boost::asio::basic_streambuf<Allocator>& b, WriteHandler 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;

  async_write(s, b.data(), transfer_all(),
      detail::write_streambuf_handler<
        AsyncWriteStream, Allocator, WriteHandler>(b, handler));
}
Exemplo n.º 13
0
inline void async_write_at(AsyncRandomAccessWriteDevice& d,
    boost::uint64_t offset, asio::basic_streambuf<Allocator>& b,
    WriteHandler 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.
  ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;

  async_write_at(d, offset, b.data(), transfer_all(),
      detail::write_at_streambuf_op<
        AsyncRandomAccessWriteDevice, Allocator, WriteHandler>(b, handler));
}
Exemplo n.º 14
0
inline void async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
    ReadHandler 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.
  ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;

  detail::read_op<AsyncReadStream, MutableBufferSequence,
    detail::transfer_all_t, ReadHandler>(
      s, buffers, transfer_all(), handler)(
        asio::error_code(), 0, 1);
}
Exemplo n.º 15
0
inline void async_read(AsyncReadStream& s,
    asio::basic_streambuf<Allocator>& b, ReadHandler 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.
  ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;

  detail::read_streambuf_op<AsyncReadStream,
    Allocator, detail::transfer_all_t, ReadHandler>(
      s, b, transfer_all(), handler)(
        asio::error_code(), 0, 1);
}
Exemplo n.º 16
0
inline void async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
    WriteHandler 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;

  detail::write_op<AsyncWriteStream, ConstBufferSequence,
    detail::transfer_all_t, WriteHandler>(
      s, buffers, transfer_all(), handler)(
        boost::system::error_code(), 0, 1);
}
Exemplo n.º 17
0
inline void async_write_at(AsyncRandomAccessWriteDevice& d,
    boost::uint64_t offset, const ConstBufferSequence& buffers,
    WriteHandler 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.
  ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;

  detail::write_at_op<AsyncRandomAccessWriteDevice,
    ConstBufferSequence, detail::transfer_all_t, WriteHandler>(
      d, offset, buffers, transfer_all(), handler)(
        asio::error_code(), 0, 1);
}
Exemplo n.º 18
0
inline std::size_t read_at(SyncRandomAccessReadDevice& d,
    uint64_t offset, lslboost::asio::basic_streambuf<Allocator>& b,
    lslboost::system::error_code& ec)
{
  return read_at(d, offset, b, transfer_all(), ec);
}
Exemplo n.º 19
0
inline std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
    asio::error_code& ec)
{
  return read(s, buffers, transfer_all(), ec);
}
Exemplo n.º 20
0
inline std::size_t read(SyncReadStream& s,
    asio::basic_streambuf<Allocator>& b,
    asio::error_code& ec)
{
  return read(s, b, transfer_all(), ec);
}
Exemplo n.º 21
0
inline void async_write_at(AsyncRandomAccessWriteDevice& d,
    boost::uint64_t offset, asio::basic_streambuf<Allocator>& b,
    WriteHandler handler)
{
  async_write_at(d, offset, b, transfer_all(), handler);
}
Exemplo n.º 22
0
inline void async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
    WriteHandler handler)
{
  async_write(s, buffers, transfer_all(), handler);
}
Exemplo n.º 23
0
inline void async_write(AsyncWriteStream& s,
    boost::asio::basic_streambuf<Allocator>& b, WriteHandler handler)
{
  async_write(s, b, transfer_all(), handler);
}
Exemplo n.º 24
0
inline std::size_t write_at(SyncRandomAccessWriteDevice& d,
    uint64_t offset, autoboost::asio::basic_streambuf<Allocator>& b,
    autoboost::system::error_code& ec)
{
  return write_at(d, offset, b, transfer_all(), ec);
}
Exemplo n.º 25
0
inline std::size_t write_at(SyncRandomAccessWriteDevice& d,
    lslboost::uint64_t offset, const ConstBufferSequence& buffers,
    lslboost::system::error_code& ec)
{
  return write_at(d, offset, buffers, transfer_all(), ec);
}
Exemplo n.º 26
0
inline void async_write_at(AsyncRandomAccessWriteDevice& d,
    boost::uint64_t offset, const ConstBufferSequence& buffers,
    WriteHandler handler)
{
  async_write_at(d, offset, buffers, transfer_all(), handler);
}
Exemplo n.º 27
0
inline std::size_t write(SyncWriteStream& s,
    boost::asio::basic_streambuf<Allocator>& b,
    boost::system::error_code& ec)
{
  return write(s, b, transfer_all(), ec);
}
Exemplo n.º 28
0
inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
    boost::system::error_code& ec)
{
  return write(s, buffers, transfer_all(), ec);
}
Exemplo n.º 29
0
inline std::size_t read_at(SyncRandomAccessReadDevice& d,
    uint64_t offset, const MutableBufferSequence& buffers,
    lslboost::system::error_code& ec)
{
  return read_at(d, offset, buffers, transfer_all(), ec);
}
Exemplo n.º 30
0
inline void async_read(AsyncReadStream& s,
    asio::basic_streambuf<Allocator>& b, ReadHandler handler)
{
  async_read(s, b, transfer_all(), handler);
}