face: increment link layer byte counters in WebSocketFace
Change-Id: I88b7dea1cbd291765345982ce193700aacd73eb3
Refs: #1781
diff --git a/daemon/face/websocket-face.cpp b/daemon/face/websocket-face.cpp
index c0d6732..79faf73 100644
--- a/daemon/face/websocket-face.cpp
+++ b/daemon/face/websocket-face.cpp
@@ -48,6 +48,7 @@
this->onSendInterest(interest);
const Block& payload = interest.wireEncode();
+ this->getMutableCounters().getNOutBytes() += payload.size();
try {
m_server.send(m_handle, payload.wire(), payload.size(),
@@ -67,6 +68,7 @@
this->onSendData(data);
const Block& payload = data.wireEncode();
+ this->getMutableCounters().getNOutBytes() += payload.size();
try {
m_server.send(m_handle, payload.wire(), payload.size(),
@@ -97,6 +99,8 @@
// Copy message into Face internal buffer
BOOST_ASSERT(msg.size() <= MAX_NDN_PACKET_SIZE);
+ this->getMutableCounters().getNInBytes() += msg.size();
+
// Try to parse message data
bool isOk = true;
Block element;