face: replace EventEmitter usage with Signal
refs #2300
Change-Id: I17d0d65d2c474b17dd9f23f271a6144b0b4fbc07
diff --git a/daemon/face/ethernet-face.cpp b/daemon/face/ethernet-face.cpp
index c63e38e..f1fd7c3 100644
--- a/daemon/face/ethernet-face.cpp
+++ b/daemon/face/ethernet-face.cpp
@@ -123,7 +123,7 @@
void
EthernetFace::sendInterest(const Interest& interest)
{
- onSendInterest(interest);
+ this->emitSignal(onSendInterest, interest);
ndnlp::PacketArray pa = m_slicer->slice(interest.wireEncode());
for (const auto& packet : *pa) {
sendPacket(packet);
@@ -133,7 +133,7 @@
void
EthernetFace::sendData(const Data& data)
{
- onSendData(data);
+ this->emitSignal(onSendData, data);
ndnlp::PacketArray pa = m_slicer->slice(data.wireEncode());
for (const auto& packet : *pa) {
sendPacket(packet);
@@ -387,7 +387,7 @@
{
// new sender, setup a PartialMessageStore for it
reassembler.pms.reset(new ndnlp::PartialMessageStore);
- reassembler.pms->onReceive +=
+ reassembler.pms->onReceive.connect(
[this, sourceAddress] (const Block& block) {
NFD_LOG_TRACE("[id:" << getId() << ",endpoint:" << m_interfaceName
<< "] All fragments received from " << sourceAddress.toString());
@@ -395,7 +395,7 @@
NFD_LOG_WARN("[id:" << getId() << ",endpoint:" << m_interfaceName
<< "] Received unrecognized TLV block of type " << block.type()
<< " from " << sourceAddress.toString());
- };
+ });
}
scheduler::cancel(reassembler.expireEvent);