22 #ifndef NDN_CXX_UTIL_DUMMY_CLIENT_FACE_HPP
23 #define NDN_CXX_UTIL_DUMMY_CLIENT_FACE_HPP
130 construct(
const Options& options);
133 enableBroadcastLink();
136 enablePacketLogging();
139 enableRegistrationReply(uint64_t faceId);
194 struct BroadcastLink;
195 shared_ptr<BroadcastLink> m_bcastLink;
196 std::unique_ptr<KeyChain> m_internalKeyChain;
A client-side face for unit testing.
void linkTo(DummyClientFace &other)
Link another DummyClientFace through a broadcast medium.
DummyClientFaceOptions Options
signal::Signal< DummyClientFace, Interest > onSendInterest
Emitted whenever an Interest is sent.
~DummyClientFace() override
void receive(const Interest &interest)
Cause the face to receive an Interest packet.
signal::Signal< DummyClientFace, lp::Nack > onSendNack
Emitted whenever a Nack is sent.
std::vector< Data > sentData
Data sent out of this DummyClientFace.
signal::Signal< DummyClientFace, Data > onSendData
Emitted whenever a Data packet is sent.
DummyClientFace(const Options &options={})
Create a dummy face with an internal I/O context.
void unlink()
Unlink the broadcast medium if previously linked.
std::vector< Interest > sentInterests
Interests sent out of this DummyClientFace.
std::vector< lp::Nack > sentNacks
Nacks sent out of this DummyClientFace.
Provide a communication channel with local or remote NDN forwarder.
The main interface for signing key management.
Provides a lightweight signal / event system.
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
::boost::chrono::milliseconds milliseconds
Options for DummyClientFace.
std::function< void(time::milliseconds)> processEventsOverride
If not empty, face.processEvents() will be overridden by this function.
DummyClientFaceOptions(bool enablePacketLogging, bool enableRegistrationReply, const std::function< void(time::milliseconds)> &processEventsOverride=nullptr)
uint64_t registrationReplyFaceId
FaceId used in prefix registration replies.
bool enableRegistrationReply
If true, prefix registration commands will be automatically replied to with a successful response.
bool enablePacketLogging
If true, packets sent out of DummyClientFace will be appended to a container.
DummyClientFaceOptions()=default