Boost C++ Libraries

PrevUpHomeNext

Class writer

boost::taar::segmented_body::writer — Serializes the segments in order; file windows are read in chunks.

Synopsis

// In header: <boost/taar/core/segmented_body.hpp>



// Serializes the segments in order; file windows are read in chunks.

class writer {
public:
  // types
  typedef boost::asio::const_buffer const_buffers_type;  // The buffer sequence type produced by get(). 

  // public member functions
  template<bool isRequest, typename Fields> 
    writer(boost::beast::http::header< isRequest, Fields > const &, 
           value_type const &);
  void init(boost::system::error_code &);
  boost::optional< std::pair< const_buffers_type, bool > > 
  get(boost::system::error_code &);

  // private member functions
  bool more() const noexcept;
};

Description

writer public member functions

  1. template<bool isRequest, typename Fields> 
      writer(boost::beast::http::header< isRequest, Fields > const &, 
             value_type const & body);
    Construct from the message header and the body value.
  2. void init(boost::system::error_code & ec);
    Nothing to prepare: files are opened when the value is built.
  3. boost::optional< std::pair< const_buffers_type, bool > > 
    get(boost::system::error_code & ec);
    The next buffer, with whether more follow; empty when done.

writer private member functions

  1. bool more() const noexcept;

PrevUpHomeNext