All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Public Attributes | List of all members
ElementReceiver Class Reference

The ElementReceiver class extends ElementListenerLite and has an onReceivedElement to process the incoming Data packet. More...

Inheritance diagram for ElementReceiver:
ndn::ElementListenerLite ndn_ElementListener

Public Member Functions

 ElementReceiver (const InterestLite &originalInterest)
 Create an ElementReceiver. More...
 
void onReceivedElement (const uint8_t *element, size_t elementLength)
 This is called when an entire packet is received. More...
 
- Public Member Functions inherited from ndn::ElementListenerLite
 ElementListenerLite (OnReceivedElementLite onReceivedElement)
 Create an ElementListenerLite to use the onReceivedElement function pointer. More...
 

Public Attributes

int callbackCount_
 

Detailed Description

The ElementReceiver class extends ElementListenerLite and has an onReceivedElement to process the incoming Data packet.

Constructor & Destructor Documentation

ElementReceiver::ElementReceiver ( const InterestLite originalInterest)
inline

Create an ElementReceiver.

Parameters
originalInterestThe original Interest so that onReceivedElement can check if the incoming Data packet matches. This does not make a copy; the referenced object must remain valid.

Member Function Documentation

void ElementReceiver::onReceivedElement ( const uint8_t *  element,
size_t  elementLength 
)

This is called when an entire packet is received.

If this is a Data packet for the original Interest that was sent, display its name and content.

Parameters
elementpointer to the element. This buffer is only valid during this call. If you need the data later, you must copy.
elementLengthlength of element

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