StreamingBody.hpp

This File On Github
Ask A Question

API: latest
module: oatpp
#include "oatpp/web/protocol/http/outgoing/StreamingBody.hpp"

StreamingBody

Abstract body for streaming data.

namespace oatpp { namespace web { namespace protocol { namespace http { namespace outgoing { 
  class StreamingBody : public Body {}
}}}}}

Methods

Return Type Name Summary
[none] StreamingBody Constructor.
v_io_size read Proxy method to readCallback::read().
void declareHeaders Override this method to declare additional headers.
p_char8 getKnownData Pointer to the body known data.
v_buff_size getKnownSize Return known size of the body.

StreamingBody::StreamingBody

Constructor.

  • @param readCallback

StreamingBody(const std::shared_ptr<data::stream::ReadCallback>& readCallback)

StreamingBody::read

Proxy method to readCallback::read().

  • @param buffer - pointer to buffer.
  • @param count - size of the buffer in bytes.
  • @param action - async specific action. If action is NOT oatpp::async::Action::TYPE_NONE, then caller MUST return this action on coroutine iteration.
  • @return - actual number of bytes written to buffer. 0 - to indicate end-of-file.

v_io_size read(void *buffer, v_buff_size count, async::Action& action) override

StreamingBody::declareHeaders

Override this method to declare additional headers.

void declareHeaders(Headers& headers) override

StreamingBody::getKnownData

Pointer to the body known data.

  • @return - nullptr.

p_char8 getKnownData() override

StreamingBody::getKnownSize

Return known size of the body.

  • @return - -1.

v_buff_size getKnownSize() override