22 #ifndef NDN_UTIL_DUMMY_CLIENT_FACE_HPP 23 #define NDN_UTIL_DUMMY_CLIENT_FACE_HPP 44 : enablePacketLogging(enablePacketLogging)
45 , enableRegistrationReply(enableRegistrationReply)
50 Options(
bool enablePacketLogging,
bool enableRegistrationReply)
51 :
Options(enablePacketLogging, enableRegistrationReply, nullptr)
132 construct(
const Options& options);
135 enableBroadcastLink();
144 doProcessEvents(time::milliseconds timeout,
bool keepThread)
override;
190 struct BroadcastLink;
191 shared_ptr<BroadcastLink> m_bcastLink;
192 std::unique_ptr<KeyChain> m_internalKeyChain;
194 std::function<void(time::milliseconds)> m_processEventsOverride;
200 #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.
The interface of signing key management.
Signal< DummyClientFace, Interest > onSendInterest
emits whenever an Interest is sent
std::vector< Interest > sentInterests
Interests sent out of this DummyClientFace.
Represents an Interest packet.
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.
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
Signal< DummyClientFace, Data > onSendData
emits whenever a Data packet is sent
void unlink()
unlink the broadcast media if previously linked
void receive(const Interest &interest)
cause the Face to receive an interest
void linkTo(DummyClientFace &other)
link another DummyClientFace through a broadcast media
a client-side face for unit testing
Options(bool enablePacketLogging, bool enableRegistrationReply)
Options(bool enablePacketLogging, bool enableRegistrationReply, const std::function< void(time::milliseconds)> &processEventsOverride)
Represents a Data packet.
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