summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-06-24 00:40:33 -0400
committerirungentoo <irungentoo@gmail.com>2013-06-24 00:40:33 -0400
commitf3dfd885ccaa7b94fe2937580b27358473b2ad48 (patch)
tree7645e68d56d568598b0c5b15a47d3fb7dba9ff22 /core
parent6e881efad6fc6e26350c64376e7265e90ef0c08d (diff)
Updated readme and DHT.h
Diffstat (limited to 'core')
-rw-r--r--core/DHT.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/core/DHT.h b/core/DHT.h
index 90036525..f1d2e5ae 100644
--- a/core/DHT.h
+++ b/core/DHT.h
@@ -53,6 +53,13 @@ typedef struct
53 53
54}Friend; 54}Friend;
55 55
56typedef struct
57{
58 IP_Port ip_port;
59 uint32_t ping_id;
60 uint32_t timestamp;
61
62}Pinged;
56 63
57 64
58//Add a new friend to the friends list 65//Add a new friend to the friends list
@@ -92,6 +99,9 @@ void bootstrap(IP_Port ip_port);
92 99
93//Global variables 100//Global variables
94 101
102//Our client id
103char self_client_id[32];
104
95//Our UDP socket. 105//Our UDP socket.
96//We only use one so it's much easier to have it as a global variable 106//We only use one so it's much easier to have it as a global variable
97int sock; 107int sock;
@@ -99,4 +109,11 @@ int sock;
99Client_data client_list[32]; 109Client_data client_list[32];
100 110
101//Let's start with a static array for testing. 111//Let's start with a static array for testing.
102Friend friends_list[256] \ No newline at end of file 112Friend friends_list[256];
113uint16_t num_friends;
114
115//The list of ip ports along with the ping_id of what we sent them and a timestamp
116//TODO: make this more efficient looping up to 128 times is a bit...
117Pinged pings[128];
118
119Pinged send_nodes[64]; \ No newline at end of file