From 1434b319f3956fa3a62033486851ab3815775901 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Tue, 23 Jun 2015 22:05:39 -0400 Subject: Added code to net_crypto to calculate rtt. --- toxcore/net_crypto.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'toxcore/net_crypto.h') 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 @@ at the dT defined in net_crypto.c */ #define CONGESTION_QUEUE_ARRAY_SIZE 24 -/* Connection ping in ms. TODO: calculate it per connection. */ -#define DEFAULT_PING_CONNECTION 50 +/* Default connection ping in ms. */ +#define DEFAULT_PING_CONNECTION 200 typedef struct { uint64_t sent_time; @@ -150,6 +150,7 @@ typedef struct { long signed int last_num_packets_sent[CONGESTION_QUEUE_ARRAY_SIZE]; uint32_t packets_sent; uint64_t last_congestion_event; + uint64_t rtt_time; /* TCP_connection connection_number */ unsigned int connection_number_tcp; -- cgit v1.2.3