Rework idle timeout, now server side (#2259)

* Server side idle timeout

Initial commit for server side idle timeout counter.  This adds a new
int value that is updated when room/game/mod/admin commands occur and is
checked during the regular ping timout function that if the users new
"idle" value exceeds the idleclienttimeout value defined in the servers
configuration file the user is logged out.  The user will receive a
warning at the 90% time frame mark about being idle.

* Use round instead of ceil

Travis fix for older xcode issue's.

* Fixed requested items

Mis-spelleed function, added header, added warning message sent check
value.  Also corrected the protobuf declaration file for
event_notifyuser

* Moved bool to protected

* Re-Ordered Declarations

* Removed most stylistic items

Resolved most noted things.

* Remove client side idle timeout

Removed client side idle timeout functionality
This commit is contained in:
woogerboy21
2016-11-08 22:18:12 -05:00
committed by GitHub
parent 1cebe030f6
commit 6962777ded
23 changed files with 65 additions and 86 deletions

View File

@@ -52,10 +52,11 @@ protected:
AuthenticationResult authState;
bool acceptsUserListChanges;
bool acceptsRoomListChanges;
bool idleClientWarningSent;
virtual void logDebugMessage(const QString & /* message */) { }
private:
QList<int> messageSizeOverTime, messageCountOverTime, commandCountOverTime;
int timeRunning, lastDataReceived;
int timeRunning, lastDataReceived, lastActionReceived;
QTimer *pingClock;
virtual void transmitProtocolItem(const ServerMessage &item) = 0;
@@ -81,6 +82,8 @@ private:
virtual Response::ResponseCode processExtendedModeratorCommand(int /* cmdType */, const ModeratorCommand & /* cmd */, ResponseContainer & /* rc */) { return Response::RespFunctionNotAllowed; }
Response::ResponseCode processAdminCommandContainer(const CommandContainer &cont, ResponseContainer &rc);
virtual Response::ResponseCode processExtendedAdminCommand(int /* cmdType */, const AdminCommand & /* cmd */, ResponseContainer & /* rc */) { return Response::RespFunctionNotAllowed; }
void resetIdleTimer();
private slots:
void pingClockTimeout();
public slots: