Dynamic send interval

This commit is contained in:
Keith Winstein
2011-08-16 23:41:16 -04:00
parent 7e37221d36
commit cf5f4bc558
2 changed files with 22 additions and 6 deletions
+3 -1
View File
@@ -76,11 +76,13 @@ namespace Network {
class Transport
{
private:
static const int SEND_INTERVAL = 50; /* ms between frames */
static const unsigned int SEND_INTERVAL_MIN = 20; /* ms between frames */
static const unsigned int SEND_INTERVAL_MAX = 250; /* ms between frames */
static const int ACK_INTERVAL = 1000; /* ms between empty acks */
static const int HEADER_LEN = 120;
/* helper methods for tick() */
unsigned int send_interval( void );
void update_assumed_receiver_state( void );
void rationalize_states( void );
void send_to_receiver( void );