summaryrefslogtreecommitdiff
path: root/src/net/netcomputer.cpp
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2008-11-20 14:52:22 +0000
committerDavid Athay <ko2fan@gmail.com>2008-11-20 14:52:22 +0000
commit1a6f01a13ab9267fd7de46592bbb3107311f8709 (patch)
treebeb960d2439bafae4b0c4835777241a33fba9fcb /src/net/netcomputer.cpp
parent8481413ea17177945d3d280b1518eb6f1f25cd5d (diff)
downloadmanaserv-1a6f01a13ab9267fd7de46592bbb3107311f8709.tar.gz
manaserv-1a6f01a13ab9267fd7de46592bbb3107311f8709.tar.bz2
manaserv-1a6f01a13ab9267fd7de46592bbb3107311f8709.tar.xz
manaserv-1a6f01a13ab9267fd7de46592bbb3107311f8709.zip
Made Bandwidth Monitor Global
Diffstat (limited to 'src/net/netcomputer.cpp')
-rw-r--r--src/net/netcomputer.cpp27
1 files changed, 1 insertions, 26 deletions
diff --git a/src/net/netcomputer.cpp b/src/net/netcomputer.cpp
index 657f615b..ff2bbb71 100644
--- a/src/net/netcomputer.cpp
+++ b/src/net/netcomputer.cpp
@@ -35,7 +35,6 @@
NetComputer::NetComputer(ENetPeer *peer):
mPeer(peer)
{
- mBandwidth = new BandwidthMonitor;
}
bool
@@ -68,7 +67,7 @@ NetComputer::send(const MessageOut &msg, bool reliable,
{
LOG_DEBUG("Sending message " << msg << " to " << *this);
- mBandwidth->increaseOutput(msg.getLength());
+ gBandwidth->increaseClientOutput(this, msg.getLength());
ENetPacket *packet;
packet = enet_packet_create(msg.getData(),
@@ -85,30 +84,6 @@ NetComputer::send(const MessageOut &msg, bool reliable,
}
}
-int
-NetComputer::totalOut()
-{
- return mBandwidth->totalOut();
-}
-
-int
-NetComputer::totalIn()
-{
- return mBandwidth->totalIn();
-}
-
-void
-NetComputer::increaseIn(int size)
-{
- mBandwidth->increaseInput(size);
-}
-
-void
-NetComputer::reset()
-{
- mBandwidth->reset();
-}
-
std::ostream&
operator <<(std::ostream &os, const NetComputer &comp)
{