diff options
author | irungentoo <irungentoo@gmail.com> | 2015-11-09 20:13:53 -0500 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2015-11-09 20:13:53 -0500 |
commit | 7022cef26edfccd2d4a5d47d3b7179958af7ce6a (patch) | |
tree | a37cce828602b45468c907c0ea7ea180e96b0881 /toxcore/net_crypto.h | |
parent | 6a494e2cbdd146bb13185d8220061322661a5f5a (diff) |
File transfer fixes.
Fixed file transfers disconnecting tox clients from each other in
some network conditions.
Diffstat (limited to 'toxcore/net_crypto.h')
-rw-r--r-- | toxcore/net_crypto.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/toxcore/net_crypto.h b/toxcore/net_crypto.h index 0ab6446e..e5484e1e 100644 --- a/toxcore/net_crypto.h +++ b/toxcore/net_crypto.h | |||
@@ -81,9 +81,10 @@ | |||
81 | /* Base current transfer speed on last CONGESTION_QUEUE_ARRAY_SIZE number of points taken | 81 | /* Base current transfer speed on last CONGESTION_QUEUE_ARRAY_SIZE number of points taken |
82 | at the dT defined in net_crypto.c */ | 82 | at the dT defined in net_crypto.c */ |
83 | #define CONGESTION_QUEUE_ARRAY_SIZE 24 | 83 | #define CONGESTION_QUEUE_ARRAY_SIZE 24 |
84 | #define CONGESTION_LAST_SENT_ARRAY_SIZE (CONGESTION_QUEUE_ARRAY_SIZE * 2) | ||
84 | 85 | ||
85 | /* Default connection ping in ms. */ | 86 | /* Default connection ping in ms. */ |
86 | #define DEFAULT_PING_CONNECTION 200 | 87 | #define DEFAULT_PING_CONNECTION 1000 |
87 | 88 | ||
88 | typedef struct { | 89 | typedef struct { |
89 | uint64_t sent_time; | 90 | uint64_t sent_time; |
@@ -147,7 +148,7 @@ typedef struct { | |||
147 | uint64_t last_packets_left_set; | 148 | uint64_t last_packets_left_set; |
148 | 149 | ||
149 | uint32_t last_sendqueue_size[CONGESTION_QUEUE_ARRAY_SIZE], last_sendqueue_counter; | 150 | uint32_t last_sendqueue_size[CONGESTION_QUEUE_ARRAY_SIZE], last_sendqueue_counter; |
150 | long signed int last_num_packets_sent[CONGESTION_QUEUE_ARRAY_SIZE]; | 151 | long signed int last_num_packets_sent[CONGESTION_LAST_SENT_ARRAY_SIZE]; |
151 | uint32_t packets_sent; | 152 | uint32_t packets_sent; |
152 | uint64_t last_congestion_event; | 153 | uint64_t last_congestion_event; |
153 | uint64_t rtt_time; | 154 | uint64_t rtt_time; |