summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2015-05-31 20:10:38 -0400
committerirungentoo <irungentoo@gmail.com>2015-05-31 20:10:38 -0400
commitb072c692e7cc38a123a465d00fc4ea9145d063b2 (patch)
tree53d6cb81df9ee9a390301fe883e643807684b159
parent240561b5574b0904543df20ea830f84ecbc13b0e (diff)
Congestion control tweaks.
-rw-r--r--toxcore/net_crypto.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c
index 6d4f6a9b..96be059d 100644
--- a/toxcore/net_crypto.c
+++ b/toxcore/net_crypto.c
@@ -2006,7 +2006,7 @@ static int udp_handle_packet(void *object, IP_Port source, const uint8_t *packet
2006#define PACKET_RESEND_MULTIPLIER 2 2006#define PACKET_RESEND_MULTIPLIER 2
2007 2007
2008/* Timeout for increasing speed after congestion event (in ms). */ 2008/* Timeout for increasing speed after congestion event (in ms). */
2009#define CONGESTION_EVENT_TIMEOUT 4000 2009#define CONGESTION_EVENT_TIMEOUT 2000
2010 2010
2011static void send_crypto_packets(Net_Crypto *c) 2011static void send_crypto_packets(Net_Crypto *c)
2012{ 2012{
@@ -2086,7 +2086,7 @@ static void send_crypto_packets(Net_Crypto *c)
2086 PACKET_COUNTER_AVERAGE_INTERVAL)); 2086 PACKET_COUNTER_AVERAGE_INTERVAL));
2087 2087
2088 if (conn->last_congestion_event + CONGESTION_EVENT_TIMEOUT < temp_time) { 2088 if (conn->last_congestion_event + CONGESTION_EVENT_TIMEOUT < temp_time) {
2089 conn->packet_send_rate = min_speed * 1.2; 2089 conn->packet_send_rate = min_speed * 1.25;
2090 } else { 2090 } else {
2091 conn->packet_send_rate = min_speed; 2091 conn->packet_send_rate = min_speed;
2092 } 2092 }