summaryrefslogtreecommitdiff
path: root/src/network/core
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-08-19 08:59:36 +0000
committerrubidium <rubidium@openttd.org>2010-08-19 08:59:36 +0000
commita4c6d07edc4937087e3f2d0b2bff52cc3980b9e2 (patch)
tree9a939be9e5c3b7bc5a0101cb3077a3d619d2dad8 /src/network/core
parentcfc0df152b40c7109ce6c2e60f80304fc97adb89 (diff)
downloadopenttd-a4c6d07edc4937087e3f2d0b2bff52cc3980b9e2.tar.xz
(svn r20553) -Feature: allow rate limiting of incoming commands
Diffstat (limited to 'src/network/core')
-rw-r--r--src/network/core/tcp_game.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/network/core/tcp_game.h b/src/network/core/tcp_game.h
index a7d3bb462..acbd47ed8 100644
--- a/src/network/core/tcp_game.h
+++ b/src/network/core/tcp_game.h
@@ -78,6 +78,7 @@ struct CommandPacket;
class CommandQueue {
CommandPacket *first; ///< The first packet in the queue.
CommandPacket *last; ///< The last packet in the queue; only valid when first != NULL.
+ uint count; ///< The number of items in the queue.
public:
/** Initialise the command queue. */
@@ -88,6 +89,8 @@ public:
CommandPacket *Pop();
CommandPacket *Peek();
void Free();
+ /** Get the number of items in the queue. */
+ uint Count() const { return this->count; }
};
/** Status of a client */