NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::security::transform::StepSource Class Reference

A source that can accept input step by step, and can close input explicitly. More...

#include <step-source.hpp>

Inheritance diagram for ndn::security::transform::StepSource:
Collaboration diagram for ndn::security::transform::StepSource:

Public Member Functions

size_t write (const uint8_t *buf, size_t size)
 Accept input data and directly write input into next transformation module. More...
 
void end ()
 Close the input interface and directly notify the next module the end of input. More...
 
- Public Member Functions inherited from ndn::security::transform::Source
Sourceoperator>> (unique_ptr< Transform > transform)
 Connect to an intermediate transformation module. More...
 
void operator>> (unique_ptr< Sink > sink)
 Connect to the last transformation module. More...
 
- Public Member Functions inherited from ndn::security::transform::Upstream
virtual ~Upstream ()=default
 

Additional Inherited Members

- Protected Member Functions inherited from ndn::security::transform::Source
 Source ()
 
void pump ()
 Pump all data into next transformation module. More...
 
size_t getIndex () const
 Get the source module index (should always be 0). More...
 
- Protected Member Functions inherited from ndn::security::transform::Upstream
 Upstream ()
 
void appendChain (unique_ptr< Downstream > tail)
 connect to next transformation module More...
 
DownstreamgetNext ()
 
- Protected Attributes inherited from ndn::security::transform::Upstream
unique_ptr< Downstreamm_next
 

Detailed Description

A source that can accept input step by step, and can close input explicitly.

This source will not send data into the transformation chain when the chain is constructed. Input will be explicitly sent into the chain using write(...) and will be closed explicitly using end().

StepSource ss; ss >> transform1() >> transform2() >> sinkStream(...); ss.write(...); ... ss.write(...); ss.end();

Definition at line 45 of file step-source.hpp.

Member Function Documentation

◆ write()

size_t ndn::security::transform::StepSource::write ( const uint8_t *  buf,
size_t  size 
)

Accept input data and directly write input into next transformation module.

One can keep calling this method to until end() is called, which indicates the end of input. After that, calling this method will cause Error.

Returns
number of bytes that has been written into next module

Definition at line 29 of file step-source.cpp.

References ndn::security::transform::Upstream::m_next.

◆ end()

void ndn::security::transform::StepSource::end ( )

Close the input interface and directly notify the next module the end of input.

Definition at line 35 of file step-source.cpp.

References ndn::security::transform::Upstream::m_next.


The documentation for this class was generated from the following files: