diff options
author | eihrul <eihrul> | 2010-05-14 23:41:14 +0000 |
---|---|---|
committer | eihrul <eihrul> | 2010-05-14 23:41:14 +0000 |
commit | 72525fbca19d4a643ae1e0547947d4d6fa32f4b4 (patch) | |
tree | 72cdff8f56a93333d4f7655e33719635dd81653c /protocol.c | |
parent | 94a1e8879fd98719fcac0ba28df84c5b72d52178 (diff) | |
download | enet-72525fbca19d4a643ae1e0547947d4d6fa32f4b4.tar.gz enet-72525fbca19d4a643ae1e0547947d4d6fa32f4b4.zip |
added totalSentData, totalSentPackets, totalReceivedData, totalReceivedPackets
Diffstat (limited to 'protocol.c')
-rw-r--r-- | protocol.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1005,7 +1005,10 @@ enet_protocol_receive_incoming_commands (ENetHost * host, ENetEvent * event) return 0; host -> receivedDataLength = receivedLength; - + + host -> totalReceivedData += receivedLength; + host -> totalReceivedPackets ++; + switch (enet_protocol_handle_incoming_commands (host, event)) { case 1: @@ -1424,6 +1427,9 @@ enet_protocol_send_outgoing_commands (ENetHost * host, ENetEvent * event, int ch if (sentLength < 0) return -1; + + host -> totalSentData += sentLength; + host -> totalSentPackets ++; } return 0; |