summaryrefslogtreecommitdiff
path: root/toxcore/net_crypto.h
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2015-11-21 11:05:26 -0500
committerirungentoo <irungentoo@gmail.com>2015-11-21 11:05:26 -0500
commit73b2144edcfd1ca617e9054479b66ab0c0361a14 (patch)
tree62d6ed3a83a40bacae6a6a61a5334d625f7f1ed7 /toxcore/net_crypto.h
parent25843bf141cedffefbf888034d6b50fbcba52319 (diff)
Increase max file transfer speed.
Fix bug that limited it to 1K packets per second.
Diffstat (limited to 'toxcore/net_crypto.h')
-rw-r--r--toxcore/net_crypto.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/toxcore/net_crypto.h b/toxcore/net_crypto.h
index 715b6e3f..8c1274f2 100644
--- a/toxcore/net_crypto.h
+++ b/toxcore/net_crypto.h
@@ -36,7 +36,7 @@
36#define CRYPTO_CONN_ESTABLISHED 4 36#define CRYPTO_CONN_ESTABLISHED 4
37 37
38/* Maximum size of receiving and sending packet buffers. */ 38/* Maximum size of receiving and sending packet buffers. */
39#define CRYPTO_PACKET_BUFFER_SIZE 16384 /* Must be a power of 2 */ 39#define CRYPTO_PACKET_BUFFER_SIZE 32768 /* Must be a power of 2 */
40 40
41/* Minimum packet rate per second. */ 41/* Minimum packet rate per second. */
42#define CRYPTO_PACKET_MIN_RATE 4.0 42#define CRYPTO_PACKET_MIN_RATE 4.0
@@ -151,10 +151,12 @@ typedef struct {
151 double packet_send_rate; 151 double packet_send_rate;
152 uint32_t packets_left; 152 uint32_t packets_left;
153 uint64_t last_packets_left_set; 153 uint64_t last_packets_left_set;
154 double last_packets_left_rem;
154 155
155 double packet_send_rate_requested; 156 double packet_send_rate_requested;
156 uint32_t packets_left_requested; 157 uint32_t packets_left_requested;
157 uint64_t last_packets_left_requested_set; 158 uint64_t last_packets_left_requested_set;
159 double last_packets_left_requested_rem;
158 160
159 uint32_t last_sendqueue_size[CONGESTION_QUEUE_ARRAY_SIZE], last_sendqueue_counter; 161 uint32_t last_sendqueue_size[CONGESTION_QUEUE_ARRAY_SIZE], last_sendqueue_counter;
160 long signed int last_num_packets_sent[CONGESTION_LAST_SENT_ARRAY_SIZE], 162 long signed int last_num_packets_sent[CONGESTION_LAST_SENT_ARRAY_SIZE],