22 #ifndef NDN_CXX_UTIL_DUMMY_CLIENT_FACE_HPP 23 #define NDN_CXX_UTIL_DUMMY_CLIENT_FACE_HPP 44 : enablePacketLogging(enablePacketLogging)
45 , enableRegistrationReply(enableRegistrationReply)
50 Options(
bool enablePacketLogging,
bool enableRegistrationReply)
51 :
Options(enablePacketLogging, enableRegistrationReply, nullptr)
136 construct(
const Options& options);
139 enableBroadcastLink();
204 #endif // NDN_CXX_UTIL_DUMMY_CLIENT_FACE_HPP bool enableRegistrationReply
if true, prefix registration command will be automatically replied with a successful response ...
std::vector< lp::Nack > sentNacks
Nacks sent out of this DummyClientFace.
Copyright (c) 2011-2015 Regents of the University of California.
Signal< DummyClientFace, Interest > onSendInterest
emits whenever an Interest is sent
std::vector< Interest > sentInterests
Interests sent out of this DummyClientFace.
~DummyClientFace() override
Represents an Interest packet.
std::vector< Data > sentData
Data sent out of this DummyClientFace.
provides a lightweight signal / event system
std::function< void(time::milliseconds)> m_processEventsOverride
represents a Network Nack
options for DummyClientFace
DummyClientFace(const Options &options=Options())
Create a dummy face with internal IO service.
Signal< DummyClientFace, lp::Nack > onSendNack
emits whenever a Nack is sent
Provide a communication channel with local or remote NDN forwarder.
Signal< DummyClientFace, Data > onSendData
emits whenever a Data packet is sent
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
void unlink()
unlink the broadcast media if previously linked
void receive(const Interest &interest)
cause the Face to receive an interest
shared_ptr< BroadcastLink > m_bcastLink
void linkTo(DummyClientFace &other)
link another DummyClientFace through a broadcast media
A client-side face for unit testing.
Options(bool enablePacketLogging, bool enableRegistrationReply)
uint64_t registrationReplyFaceId
FaceId used in prefix registration replies.
Options(bool enablePacketLogging, bool enableRegistrationReply, const std::function< void(time::milliseconds)> &processEventsOverride)
Represents a Data packet.
std::unique_ptr< KeyChain > m_internalKeyChain
bool enablePacketLogging
if true, packets sent out of DummyClientFace will be appended to a container
std::function< void(time::milliseconds)> processEventsOverride
if not empty, face.processEvents() will be overridden by this function
boost::chrono::milliseconds milliseconds