BodyOutputStream.hpp

This File On Github
Ask A Question

API: latest
module: oatpp-curl
#include "oatpp-curl/io/BodyOutputStream.hpp"

BodyOutputStream

Wrapper over oatpp::curl::io::CurlBodyWriter providing oatpp::data::stream::OutputStream interface.

namespace oatpp { namespace curl { namespace io { 
  class BodyOutputStream : public oatpp::data::stream::OutputStream {}
}}}

Methods

Return Type Name Summary
[none] BodyOutputStream Constructor.
data::v_io_size write Write data to stream. Implementation of oatpp::data::stream::OutputStream::write() method.
oatpp::async::Action suggestOutputStreamAction Implementation of OutputStream must suggest async actions for I/O results.
void setOutputStreamIOMode Set OutputStream I/O mode.
oatpp::data::stream::IOMode getOutputStreamIOMode Set OutputStream I/O mode.

BodyOutputStream::BodyOutputStream

Constructor.

  • @param writer
  • @param ioMode

BodyOutputStream(const std::shared_ptr<CurlBodyWriter> writer, oatpp::data::stream::IOMode ioMode)

BodyOutputStream::write

Write data to stream. Implementation of oatpp::data::stream::OutputStream::write() method.

  • @param data - data to write.
  • @param count - data size.
  • @return - actual amount of bytes written. oatpp::data::v_io_size.

data::v_io_size write(const void *data, data::v_io_size count) override

BodyOutputStream::suggestOutputStreamAction

Implementation of OutputStream must suggest async actions for I/O results. Suggested Action is used for scheduling coroutines in async::Executor.

oatpp::async::Action suggestOutputStreamAction(data::v_io_size ioResult) override

BodyOutputStream::setOutputStreamIOMode

Set OutputStream I/O mode.

  • @param ioMode

void setOutputStreamIOMode(oatpp::data::stream::IOMode ioMode) override

BodyOutputStream::getOutputStreamIOMode

Set OutputStream I/O mode.

  • @return

oatpp::data::stream::IOMode getOutputStreamIOMode() override