diff options
author | irungentoo <irungentoo@gmail.com> | 2014-05-11 18:27:23 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2014-05-11 18:27:23 -0400 |
commit | 1580a5c696478aec1b17946e323a4091430106c5 (patch) | |
tree | 421a21a21579d4a72406081ab3364cbaf1259f78 /toxcore/net_crypto.h | |
parent | ff4368add70d4e36dd553fdc32efe38bdef677b9 (diff) |
Added kill packets.
There should be no more delay between a peer closing their client
and their friend being notified of them going offline. (unless the
kill packet is lost)
Diffstat (limited to 'toxcore/net_crypto.h')
-rw-r--r-- | toxcore/net_crypto.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/toxcore/net_crypto.h b/toxcore/net_crypto.h index ba5ed924..7d616be6 100644 --- a/toxcore/net_crypto.h +++ b/toxcore/net_crypto.h | |||
@@ -56,6 +56,7 @@ | |||
56 | 56 | ||
57 | #define PACKET_ID_PADDING 0 | 57 | #define PACKET_ID_PADDING 0 |
58 | #define PACKET_ID_REQUEST 1 | 58 | #define PACKET_ID_REQUEST 1 |
59 | #define PACKET_ID_KILL 2 | ||
59 | 60 | ||
60 | #define CRYPTO_RESERVED_PACKETS 16 | 61 | #define CRYPTO_RESERVED_PACKETS 16 |
61 | 62 | ||
@@ -119,6 +120,8 @@ typedef struct { | |||
119 | uint64_t last_packets_left_set; | 120 | uint64_t last_packets_left_set; |
120 | 121 | ||
121 | uint8_t sending; /* indicates if data is being sent or not. */ | 122 | uint8_t sending; /* indicates if data is being sent or not. */ |
123 | |||
124 | uint8_t killed; /* set to 1 to kill the connection. */ | ||
122 | } Crypto_Connection; | 125 | } Crypto_Connection; |
123 | 126 | ||
124 | typedef struct { | 127 | typedef struct { |