22 #ifndef NDN_UTIL_DUMMY_CLIENT_FACE_HPP 23 #define NDN_UTIL_DUMMY_CLIENT_FACE_HPP 25 #include "../face.hpp" 27 #include "../security/key-chain.hpp" 44 : enablePacketLogging(enablePacketLogging)
45 , enableRegistrationReply(enableRegistrationReply)
50 Options(
bool enablePacketLogging,
bool enableRegistrationReply)
51 :
Options(enablePacketLogging, enableRegistrationReply, nullptr)
98 template<
typename Packet>
106 construct(
const Options& options);
115 doProcessEvents(
const time::milliseconds& timeout,
bool keepThread)
override;
161 std::unique_ptr<KeyChain> m_internalKeyChain;
163 std::function<void(time::milliseconds)> m_processEventsOverride;
173 #endif // NDN_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.
The packet signing interface.
std::vector< Data > sentData
Data sent out of this DummyClientFace.
provides a lightweight signal / event system
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
a client-side face for unit testing
Options(bool enablePacketLogging, bool enableRegistrationReply)
void receive(const Packet &packet)
cause the Face to receive a packet
Options(bool enablePacketLogging, bool enableRegistrationReply, const std::function< void(time::milliseconds)> &processEventsOverride)
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