From c258e0bc4ec62a2e7f6a09e9e1d82d4b072740c1 Mon Sep 17 00:00:00 2001 From: Keegan McAllister Date: Wed, 2 May 2012 17:53:53 -0400 Subject: [PATCH] Make timing parameters public within namespace Network So that UI timeouts can adjust accordingly. --- src/network/transportsender.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/network/transportsender.h b/src/network/transportsender.h index f32e67c..8af4990 100644 --- a/src/network/transportsender.h +++ b/src/network/transportsender.h @@ -34,18 +34,18 @@ using std::pair; using namespace TransportBuffers; namespace Network { + /* timing parameters */ + const int SEND_INTERVAL_MIN = 20; /* ms between frames */ + const int SEND_INTERVAL_MAX = 250; /* ms between frames */ + const int ACK_INTERVAL = 3000; /* ms between empty acks */ + const int ACK_DELAY = 100; /* ms before delayed ack */ + const int SHUTDOWN_RETRIES = 16; /* number of shutdown packets to send before giving up */ + const int ACTIVE_RETRY_TIMEOUT = 10000; /* attempt to resend at frame rate */ + template class TransportSender { private: - /* timing parameters */ - static const int SEND_INTERVAL_MIN = 20; /* ms between frames */ - static const int SEND_INTERVAL_MAX = 250; /* ms between frames */ - static const int ACK_INTERVAL = 3000; /* ms between empty acks */ - static const int ACK_DELAY = 100; /* ms before delayed ack */ - static const int SHUTDOWN_RETRIES = 16; /* number of shutdown packets to send before giving up */ - static const int ACTIVE_RETRY_TIMEOUT = 10000; /* attempt to resend at frame rate */ - /* helper methods for tick() */ void update_assumed_receiver_state( void ); void attempt_prospective_resend_optimization( string &proposed_diff );