diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2014-08-09 08:07:07 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2014-08-09 08:07:07 +0000 |
commit | 2e80e1093ab6de23c33fbc1f258ce281f1e4dae6 (patch) | |
tree | 89e211f022d52ae4ec1c6e0f4f53459045c36069 /protocols/Tox/src/tox_events.cpp | |
parent | 986b1be299498ba4f46c7346f99728e31369f631 (diff) |
Tox:
- added pooling thread
- added test code to check connection
git-svn-id: http://svn.miranda-ng.org/main/trunk@10133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_events.cpp')
-rw-r--r-- | protocols/Tox/src/tox_events.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/protocols/Tox/src/tox_events.cpp b/protocols/Tox/src/tox_events.cpp index 550cdd2999..dc45cb34a6 100644 --- a/protocols/Tox/src/tox_events.cpp +++ b/protocols/Tox/src/tox_events.cpp @@ -1,5 +1,22 @@ #include "common.h"
+void CToxProto::PollingThread(void*)
+{
+ debugLogA("CToxProto::PollingThread: entering");
+ while (!isTerminated)
+ {
+ uint32_t interval = 1000;
+ {
+ //mir_cslock lock(tox_lock);
+
+ tox_do(tox);
+ interval = tox_do_interval(tox);
+ }
+ Sleep(interval);
+ }
+ debugLogA("CToxProto::PollingThread: leaving");
+}
+
void CToxProto::OnFriendRequest(Tox *tox, const uint8_t *userId, const uint8_t *message, const uint16_t messageSize, void *arg)
{
}
|