summaryrefslogtreecommitdiff
path: root/toxcore/Messenger.h
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/Messenger.h')
-rw-r--r--toxcore/Messenger.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/toxcore/Messenger.h b/toxcore/Messenger.h
index 63fb2820..5221e639 100644
--- a/toxcore/Messenger.h
+++ b/toxcore/Messenger.h
@@ -42,8 +42,7 @@ enum {
42 MESSAGE_ACTION 42 MESSAGE_ACTION
43}; 43};
44 44
45/* NOTE: Packet ids below 20 must never be used. */ 45/* NOTE: Packet ids below 24 must never be used. */
46#define PACKET_ID_SHARE_RELAYS 23
47#define PACKET_ID_ONLINE 24 46#define PACKET_ID_ONLINE 24
48#define PACKET_ID_OFFLINE 25 47#define PACKET_ID_OFFLINE 25
49#define PACKET_ID_NICKNAME 48 48#define PACKET_ID_NICKNAME 48
@@ -62,9 +61,6 @@ enum {
62#define PACKET_ID_MESSAGE_GROUPCHAT 99 61#define PACKET_ID_MESSAGE_GROUPCHAT 99
63#define PACKET_ID_LOSSY_GROUPCHAT 199 62#define PACKET_ID_LOSSY_GROUPCHAT 199
64 63
65/* Max number of tcp relays sent to friends */
66#define MAX_SHARED_RELAYS 16
67
68/* All packets starting with a byte in this range can be used for anything. */ 64/* All packets starting with a byte in this range can be used for anything. */
69#define PACKET_ID_LOSSLESS_RANGE_START 160 65#define PACKET_ID_LOSSLESS_RANGE_START 160
70#define PACKET_ID_LOSSLESS_RANGE_SIZE 32 66#define PACKET_ID_LOSSLESS_RANGE_SIZE 32
@@ -110,13 +106,11 @@ enum {
110/* Default start timeout in seconds between friend requests. */ 106/* Default start timeout in seconds between friend requests. */
111#define FRIENDREQUEST_TIMEOUT 5; 107#define FRIENDREQUEST_TIMEOUT 5;
112 108
113/* Interval between the sending of tcp relay information */
114#define FRIEND_SHARE_RELAYS_INTERVAL (5 * 60)
115
116enum { 109enum {
117 CONNECTION_NONE, 110 CONNECTION_NONE,
118 CONNECTION_TCP, 111 CONNECTION_TCP,
119 CONNECTION_UDP 112 CONNECTION_UDP,
113 CONNECTION_UNKNOWN
120}; 114};
121 115
122/* USERSTATUS - 116/* USERSTATUS -
@@ -199,7 +193,6 @@ typedef struct {
199 uint32_t message_id; // a semi-unique id used in read receipts. 193 uint32_t message_id; // a semi-unique id used in read receipts.
200 uint32_t friendrequest_nospam; // The nospam number used in the friend request. 194 uint32_t friendrequest_nospam; // The nospam number used in the friend request.
201 uint64_t last_seen_time; 195 uint64_t last_seen_time;
202 uint64_t share_relays_lastsent;
203 uint8_t last_connection_udp_tcp; 196 uint8_t last_connection_udp_tcp;
204 struct File_Transfers file_sending[MAX_CONCURRENT_FILE_PIPES]; 197 struct File_Transfers file_sending[MAX_CONCURRENT_FILE_PIPES];
205 unsigned int num_sending_files; 198 unsigned int num_sending_files;