diff options
Diffstat (limited to 'toxcore/Messenger.c')
-rw-r--r-- | toxcore/Messenger.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index c8d69494..54ee6cce 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #endif | 26 | #endif |
27 | 27 | ||
28 | #include "Messenger.h" | 28 | #include "Messenger.h" |
29 | #include "network.h" | ||
29 | #include "util.h" | 30 | #include "util.h" |
30 | 31 | ||
31 | #define MIN(a,b) (((a)<(b))?(a):(b)) | 32 | #define MIN(a,b) (((a)<(b))?(a):(b)) |
@@ -1388,6 +1389,21 @@ void doMessenger(Messenger *m) | |||
1388 | #endif | 1389 | #endif |
1389 | } | 1390 | } |
1390 | 1391 | ||
1392 | /* | ||
1393 | * Waits for something to happen on the socket for up to milliseconds milliseconds | ||
1394 | * *** Function MUSTN'T poll. *** | ||
1395 | * The function mustn't modify anything at all, so it can be called completely | ||
1396 | * asynchronously without any worry. | ||
1397 | * | ||
1398 | * returns 0 if the timeout was reached | ||
1399 | * returns 1 if there is socket activity (i.e. tox_do() should be called) | ||
1400 | * | ||
1401 | */ | ||
1402 | int waitMessenger(Messenger *m, uint16_t milliseconds) | ||
1403 | { | ||
1404 | return networking_wait(m->net, milliseconds); | ||
1405 | }; | ||
1406 | |||
1391 | /* return size of the messenger data (for saving) */ | 1407 | /* return size of the messenger data (for saving) */ |
1392 | uint32_t Messenger_size_old(Messenger *m) | 1408 | uint32_t Messenger_size_old(Messenger *m) |
1393 | { | 1409 | { |