22 #ifndef NDN_CXX_UTIL_DUMMY_CLIENT_FACE_HPP
23 #define NDN_CXX_UTIL_DUMMY_CLIENT_FACE_HPP
132 construct(
const Options& options);
135 enableBroadcastLink();
138 enablePacketLogging();
141 enableRegistrationReply();
190 struct BroadcastLink;
191 shared_ptr<BroadcastLink> m_bcastLink;
192 std::unique_ptr<KeyChain> m_internalKeyChain;
193 KeyChain& m_keyChain;
Represents a Data packet.
Provide a communication channel with local or remote NDN forwarder.
Represents an Interest packet.
represents a Network Nack
options for DummyClientFace
Options(bool enablePacketLogging, bool enableRegistrationReply)
std::function< void(time::milliseconds)> processEventsOverride
if not empty, face.processEvents() will be overridden by this function
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
bool enableRegistrationReply
if true, prefix registration command will be automatically replied with a successful response
A client-side face for unit testing.
std::vector< Interest > sentInterests
Interests sent out of this DummyClientFace.
void receive(const Interest &interest)
cause the Face to receive an interest
Signal< DummyClientFace, Interest > onSendInterest
emits whenever an Interest is sent
void linkTo(DummyClientFace &other)
link another DummyClientFace through a broadcast media
Signal< DummyClientFace, lp::Nack > onSendNack
emits whenever a Nack is sent
void unlink()
unlink the broadcast media if previously linked
Signal< DummyClientFace, Data > onSendData
emits whenever a Data packet is sent
std::vector< Data > sentData
Data sent out of this DummyClientFace.
std::vector< lp::Nack > sentNacks
Nacks sent out of this DummyClientFace.
~DummyClientFace() override
DummyClientFace(const Options &options=Options())
Create a dummy face with internal IO service.
provides a lightweight signal / event system
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
boost::chrono::milliseconds milliseconds