summaryrefslogtreecommitdiff
path: root/toxcore/net_crypto.h
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2015-06-23 22:05:39 -0400
committerirungentoo <irungentoo@gmail.com>2015-06-23 22:05:39 -0400
commit1434b319f3956fa3a62033486851ab3815775901 (patch)
tree67ce6739200b3e88fb94d33e009515dc6af545b0 /toxcore/net_crypto.h
parentf0433595f9c118bd19f1bf310ae65c02fbb2eb22 (diff)
Added code to net_crypto to calculate rtt.
Diffstat (limited to 'toxcore/net_crypto.h')
-rw-r--r--toxcore/net_crypto.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/toxcore/net_crypto.h b/toxcore/net_crypto.h
index 56f43cc4..0ab6446e 100644
--- a/toxcore/net_crypto.h
+++ b/toxcore/net_crypto.h
@@ -82,8 +82,8 @@
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 84
85/* Connection ping in ms. TODO: calculate it per connection. */ 85/* Default connection ping in ms. */
86#define DEFAULT_PING_CONNECTION 50 86#define DEFAULT_PING_CONNECTION 200
87 87
88typedef struct { 88typedef struct {
89 uint64_t sent_time; 89 uint64_t sent_time;
@@ -150,6 +150,7 @@ typedef struct {
150 long signed int last_num_packets_sent[CONGESTION_QUEUE_ARRAY_SIZE]; 150 long signed int last_num_packets_sent[CONGESTION_QUEUE_ARRAY_SIZE];
151 uint32_t packets_sent; 151 uint32_t packets_sent;
152 uint64_t last_congestion_event; 152 uint64_t last_congestion_event;
153 uint64_t rtt_time;
153 154
154 /* TCP_connection connection_number */ 155 /* TCP_connection connection_number */
155 unsigned int connection_number_tcp; 156 unsigned int connection_number_tcp;