preliminary support for cumulative measurements

This commit is contained in:
Arnout Engelen
2006-11-04 18:56:08 +00:00
parent 90577e8be5
commit 501954c7c1
4 changed files with 145 additions and 48 deletions

View File

@@ -80,6 +80,8 @@ Connection::Connection (Packet * packet)
lastpacket = packet->time.tv_sec;
if (DEBUG)
std::cout << "New reference packet created at " << refpacket << std::endl;
sumSent = 0;
sumRecv = 0;
}
Connection::~Connection ()
@@ -124,8 +126,12 @@ void Connection::add (Packet * packet)
lastpacket = packet->time.tv_sec;
if (packet->Outgoing())
{
sumSent += packet->len;
sent_packets->add (packet);
} else {
}
else
{
sumRecv += packet->len;
recv_packets->add (packet);
}
}