summaryrefslogtreecommitdiff
path: root/toxcore/Messenger.h
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/Messenger.h')
-rw-r--r--toxcore/Messenger.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/toxcore/Messenger.h b/toxcore/Messenger.h
index ee3c3fa5..c3ae686a 100644
--- a/toxcore/Messenger.h
+++ b/toxcore/Messenger.h
@@ -189,7 +189,7 @@ typedef struct {
189 } lossless_packethandlers[PACKET_ID_LOSSLESS_RANGE_SIZE]; 189 } lossless_packethandlers[PACKET_ID_LOSSLESS_RANGE_SIZE];
190} Friend; 190} Friend;
191 191
192 192#define NUM_SAVED_TCP_RELAYS 8
193typedef struct Messenger { 193typedef struct Messenger {
194 194
195 Networking_Core *net; 195 Networking_Core *net;
@@ -219,9 +219,8 @@ typedef struct Messenger {
219 219
220 uint64_t last_LANdiscovery; 220 uint64_t last_LANdiscovery;
221 221
222 // Relays loaded from config 222 uint8_t has_added_relays; // If the first connection has occurred in do_messenger
223 // 8 should be NUM_SAVED_TCP_RELAYS but it is defined in c file 223 Node_format loaded_relays[NUM_SAVED_TCP_RELAYS]; // Relays loaded from config
224 Node_format loaded_relays[8];
225 224
226 void (*friend_message)(struct Messenger *m, int32_t, const uint8_t *, uint16_t, void *); 225 void (*friend_message)(struct Messenger *m, int32_t, const uint8_t *, uint16_t, void *);
227 void *friend_message_userdata; 226 void *friend_message_userdata;
@@ -780,9 +779,6 @@ void messenger_save(const Messenger *m, uint8_t *data);
780/* Load the messenger from data of size length. */ 779/* Load the messenger from data of size length. */
781int messenger_load(Messenger *m, const uint8_t *data, uint32_t length); 780int messenger_load(Messenger *m, const uint8_t *data, uint32_t length);
782 781
783/* Connect after loading messenger from file */
784int messenger_connect(Messenger *m);
785
786/* Return the number of friends in the instance m. 782/* Return the number of friends in the instance m.
787 * You should use this to determine how much memory to allocate 783 * You should use this to determine how much memory to allocate
788 * for copy_friendlist. */ 784 * for copy_friendlist. */