From a4c6d07edc4937087e3f2d0b2bff52cc3980b9e2 Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 19 Aug 2010 08:59:36 +0000 Subject: (svn r20553) -Feature: allow rate limiting of incoming commands --- src/network/core/tcp_game.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/network/core') 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 */ -- cgit v1.2.3-54-g00ecf