summaryrefslogtreecommitdiff
path: root/toxcore/Messenger.h
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/Messenger.h')
-rw-r--r--toxcore/Messenger.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/toxcore/Messenger.h b/toxcore/Messenger.h
index b72a0831..c505f1f1 100644
--- a/toxcore/Messenger.h
+++ b/toxcore/Messenger.h
@@ -41,6 +41,7 @@
41 41
42/* NOTE: Packet ids below 16 must never be used. */ 42/* NOTE: Packet ids below 16 must never be used. */
43#define PACKET_ID_ALIVE 16 43#define PACKET_ID_ALIVE 16
44#define PACKET_ID_SHARE_RELAYS 17
44#define PACKET_ID_NICKNAME 48 45#define PACKET_ID_NICKNAME 48
45#define PACKET_ID_STATUSMESSAGE 49 46#define PACKET_ID_STATUSMESSAGE 49
46#define PACKET_ID_USERSTATUS 50 47#define PACKET_ID_USERSTATUS 50
@@ -88,9 +89,13 @@ enum {
88/* Interval between the sending of ping packets. */ 89/* Interval between the sending of ping packets. */
89#define FRIEND_PING_INTERVAL 5 90#define FRIEND_PING_INTERVAL 5
90 91
92/* Interval between the sending of tcp relay information */
93#define FRIEND_SHARE_RELAYS_INTERVAL (5 * 60)
94
91/* If no packets are received from friend in this time interval, kill the connection. */ 95/* If no packets are received from friend in this time interval, kill the connection. */
92#define FRIEND_CONNECTION_TIMEOUT (FRIEND_PING_INTERVAL * 2) 96#define FRIEND_CONNECTION_TIMEOUT (FRIEND_PING_INTERVAL * 2)
93 97
98
94/* USERSTATUS - 99/* USERSTATUS -
95 * Represents userstatuses someone can have. 100 * Represents userstatuses someone can have.
96 */ 101 */
@@ -153,6 +158,7 @@ typedef struct {
153 uint32_t friendrequest_nospam; // The nospam number used in the friend request. 158 uint32_t friendrequest_nospam; // The nospam number used in the friend request.
154 uint64_t ping_lastrecv; 159 uint64_t ping_lastrecv;
155 uint64_t ping_lastsent; 160 uint64_t ping_lastsent;
161 uint64_t share_relays_lastsent;
156 struct File_Transfers file_sending[MAX_CONCURRENT_FILE_PIPES]; 162 struct File_Transfers file_sending[MAX_CONCURRENT_FILE_PIPES];
157 struct File_Transfers file_receiving[MAX_CONCURRENT_FILE_PIPES]; 163 struct File_Transfers file_receiving[MAX_CONCURRENT_FILE_PIPES];
158 int invited_groups[MAX_INVITED_GROUPS]; 164 int invited_groups[MAX_INVITED_GROUPS];