summaryrefslogtreecommitdiff
path: root/toxcore/onion_client.h
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2015-03-11 15:37:25 -0400
committerirungentoo <irungentoo@gmail.com>2015-03-11 15:37:25 -0400
commit43fe6e71bd06dd4fcc2bb49662f56b493ed9b6fc (patch)
treee7b36ae30312bbe11e2e74f7a40538ac84056f42 /toxcore/onion_client.h
parent572484f06ec75df61960077b033a9c7e4d28d283 (diff)
tox_callback_connection_status() implemented.
Attempted fix of connection checking to make it more stable.
Diffstat (limited to 'toxcore/onion_client.h')
-rw-r--r--toxcore/onion_client.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/toxcore/onion_client.h b/toxcore/onion_client.h
index 6851d929..e10a86c5 100644
--- a/toxcore/onion_client.h
+++ b/toxcore/onion_client.h
@@ -157,6 +157,9 @@ typedef struct {
157 } Onion_Data_Handlers[256]; 157 } Onion_Data_Handlers[256];
158 158
159 uint64_t last_packet_recv; 159 uint64_t last_packet_recv;
160
161 unsigned int onion_connected;
162 _Bool UDP_connected;
160} Onion_Client; 163} Onion_Client;
161 164
162 165
@@ -278,8 +281,9 @@ void kill_onion_client(Onion_Client *onion_c);
278 281
279 282
280/* return 0 if we are not connected to the network. 283/* return 0 if we are not connected to the network.
281 * return 1 if we are. 284 * return 1 if we are connected with TCP only.
285 * return 2 if we are also connected with UDP.
282 */ 286 */
283int onion_isconnected(const Onion_Client *onion_c); 287unsigned int onion_connection_status(const Onion_Client *onion_c);
284 288
285#endif 289#endif