summaryrefslogtreecommitdiff
path: root/toxcore/TCP_server.h
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2014-03-30 20:56:59 -0400
committerirungentoo <irungentoo@gmail.com>2014-03-30 20:56:59 -0400
commit27a7bf5b1e65f715ae2a7f8c76fa8761be389857 (patch)
treee4cf3b9d78cc6acfaa1a9786c29316e864f8f616 /toxcore/TCP_server.h
parent98cba889a70c62847da9127832e3aece8722e235 (diff)
TCP server now sends/handles ping packets.
Diffstat (limited to 'toxcore/TCP_server.h')
-rw-r--r--toxcore/TCP_server.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/toxcore/TCP_server.h b/toxcore/TCP_server.h
index 7461fe5d..8cd18438 100644
--- a/toxcore/TCP_server.h
+++ b/toxcore/TCP_server.h
@@ -49,6 +49,10 @@
49 49
50#define TCP_ONION_FAMILY (AF_INET6 + 1) 50#define TCP_ONION_FAMILY (AF_INET6 + 1)
51 51
52/* frequency to ping connected nodes and timeout in seconds */
53#define TCP_PING_FREQUENCY 30
54#define TCP_PING_TIMEOUT 20
55
52enum { 56enum {
53 TCP_STATUS_NO_STATUS, 57 TCP_STATUS_NO_STATUS,
54 TCP_STATUS_CONNECTED, 58 TCP_STATUS_CONNECTED,
@@ -75,6 +79,9 @@ typedef struct TCP_Secure_Connection {
75 uint16_t last_packet_sent; 79 uint16_t last_packet_sent;
76 80
77 uint64_t identifier; 81 uint64_t identifier;
82
83 uint64_t last_pinged;
84 uint64_t ping_id;
78} TCP_Secure_Connection; 85} TCP_Secure_Connection;
79 86
80 87