esp8266ndn
NDN Arduino library for ESP8266 and more
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | List of all members
ndnph::PingServer Class Reference

Respond to every incoming Interest with empty Data. More...

#include <ping-server.hpp>

Inherits ndnph::PacketHandler.

Public Member Functions

 PingServer (Name prefix, Face &face, const PrivateKey &signer=DigestKey::get())
 Constructor.
 
- Public Member Functions inherited from ndnph::PacketHandler
 PacketHandler ()=default
 Construct without adding to Face.
 
 PacketHandler (Face &face, int8_t prio=0)
 Construct and add handler to Face.
 

Private Member Functions

bool processInterest (Interest interest) final
 Override to receive Interest packets.
 

Additional Inherited Members

- Public Types inherited from ndnph::PacketHandler
using PacketInfo = Face::PacketInfo
 
- Protected Member Functions inherited from ndnph::PacketHandler
virtual ~PacketHandler ()
 Remove handler from Face.
 
FacegetFace () const
 
const PacketInfogetCurrentPacketInfo () const
 Retrieve information about current processing packet.
 
template<typename Packet >
bool send (Region &region, const Packet &packet, PacketInfo pi={})
 Synchronously transmit a packet.
 
template<typename Packet , typename... PacketInfoModifier>
bool send (Region &region, const Packet &packet, const PacketInfoModifier &... pim)
 Synchronously transmit a packet.
 
template<typename Packet , typename... Arg, typename = typename std::enable_if< !std::is_base_of<Region, typename std::decay<Packet>::type>::value>::type>
bool send (const Packet &packet, Arg &&... arg)
 Synchronously transmit a packet.
 
template<typename... Arg>
bool reply (Arg &&... arg)
 Synchronously transmit a packet in reply to current processing packet.
 

Detailed Description

Respond to every incoming Interest with empty Data.

Constructor & Destructor Documentation

◆ PingServer()

ndnph::PingServer::PingServer ( Name  prefix,
Face face,
const PrivateKey signer = DigestKey::get() 
)
inlineexplicit

Constructor.

Parameters
prefixname prefix to serve. It should have 'ping' suffix.
faceface for communication.

Member Function Documentation

◆ processInterest()

bool ndnph::PingServer::processInterest ( Interest  )
inlinefinalprivatevirtual

Override to receive Interest packets.

Return values
truepacket has been accepted by this handler.
falsepacket is not accepted, and should go to the next handler.

Reimplemented from ndnph::PacketHandler.


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