face: move packet encoding to Impl class
Practical limit of packet size is now enforced on encoded
NDNLPv2 packets instead of network-layer packets.
If a packet exceeds size limit, the face throws a
Face::OversizedPacketError exception. Since packet encoding may
be asynchronous, this exception could be thrown by
Face::processEvents instead of Face::expressInterest and
Face::put.
refs #4228
Change-Id: Ib68cf80b3b8967fdd0ba040bd8ee595a0eff740e
diff --git a/src/util/dummy-client-face.cpp b/src/util/dummy-client-face.cpp
index 24b05a3..57a43b7 100644
--- a/src/util/dummy-client-face.cpp
+++ b/src/util/dummy-client-face.cpp
@@ -20,6 +20,7 @@
*/
#include "dummy-client-face.hpp"
+#include "../detail/lp-field-tag.hpp"
#include "../lp/packet.hpp"
#include "../lp/tags.hpp"
#include "../mgmt/nfd/controller.hpp"
@@ -217,16 +218,6 @@
});
}
-template<typename Field, typename Tag, typename Packet>
-static void
-addFieldFromTag(lp::Packet& lpPacket, const Packet& packet)
-{
- shared_ptr<Tag> tag = static_cast<const TagHost&>(packet).getTag<Tag>();
- if (tag != nullptr) {
- lpPacket.add<Field>(*tag);
- }
-}
-
void
DummyClientFace::receive(const Interest& interest)
{