diff options
author | irungentoo <irungentoo@gmail.com> | 2015-01-07 21:43:58 -0500 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2015-01-07 21:43:58 -0500 |
commit | 75b7e0dd46759619bb9c56b611daa434e444b789 (patch) | |
tree | a0b47782f5cca36b3da4b29759da4a9933db43b6 /toxcore | |
parent | 139fc8e0f0b31048620a0cccf71a91182337a043 (diff) |
Send less net_crypto packets.
Increased interval for sending packets that include cookie request
packets, handshake packets and request packets.
Diffstat (limited to 'toxcore')
-rw-r--r-- | toxcore/net_crypto.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/net_crypto.h b/toxcore/net_crypto.h index 78dea54e..b9fb1747 100644 --- a/toxcore/net_crypto.h +++ b/toxcore/net_crypto.h | |||
@@ -54,14 +54,14 @@ | |||
54 | #define MAX_CRYPTO_DATA_SIZE (MAX_CRYPTO_PACKET_SIZE - CRYPTO_DATA_PACKET_MIN_SIZE) | 54 | #define MAX_CRYPTO_DATA_SIZE (MAX_CRYPTO_PACKET_SIZE - CRYPTO_DATA_PACKET_MIN_SIZE) |
55 | 55 | ||
56 | /* Interval in ms between sending cookie request/handshake packets. */ | 56 | /* Interval in ms between sending cookie request/handshake packets. */ |
57 | #define CRYPTO_SEND_PACKET_INTERVAL 500 | 57 | #define CRYPTO_SEND_PACKET_INTERVAL 1000 |
58 | 58 | ||
59 | /* The maximum number of times we try to send the cookie request and handshake | 59 | /* The maximum number of times we try to send the cookie request and handshake |
60 | before giving up. */ | 60 | before giving up. */ |
61 | #define MAX_NUM_SENDPACKET_TRIES 8 | 61 | #define MAX_NUM_SENDPACKET_TRIES 8 |
62 | 62 | ||
63 | /* The timeout of no received UDP packets before the direct UDP connection is considered dead. */ | 63 | /* The timeout of no received UDP packets before the direct UDP connection is considered dead. */ |
64 | #define UDP_DIRECT_TIMEOUT (MAX_NUM_SENDPACKET_TRIES * CRYPTO_SEND_PACKET_INTERVAL * 2) | 64 | #define UDP_DIRECT_TIMEOUT (MAX_NUM_SENDPACKET_TRIES * CRYPTO_SEND_PACKET_INTERVAL) |
65 | 65 | ||
66 | #define PACKET_ID_PADDING 0 /* Denotes padding */ | 66 | #define PACKET_ID_PADDING 0 /* Denotes padding */ |
67 | #define PACKET_ID_REQUEST 1 /* Used to request unreceived packets */ | 67 | #define PACKET_ID_REQUEST 1 /* Used to request unreceived packets */ |