From 6052b1f119d2b1494a7f2691f4dfed235b560636 Mon Sep 17 00:00:00 2001 From: slvr Date: Sat, 10 Aug 2013 00:30:18 +0100 Subject: network_registerhandler --- testing/DHT_test.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'testing/DHT_test.c') diff --git a/testing/DHT_test.c b/testing/DHT_test.c index c8feaf4b..350093fd 100644 --- a/testing/DHT_test.c +++ b/testing/DHT_test.c @@ -156,14 +156,20 @@ int main(int argc, char *argv[]) bootstrap_ip_port.ip.i = inet_addr(argv[1]); DHT_bootstrap(bootstrap_ip_port, hex_string_to_bin(argv[3])); +/* IP_Port ip_port; uint8_t data[MAX_UDP_PACKET_SIZE]; uint32_t length; +*/ + + DHT_init(); + friendreq_init(); while(1) { doDHT(); +/* slvrTODO: while(receivepacket(&ip_port, data, &length) != -1) { if(DHT_handlepacket(data, length, ip_port) && friendreq_handlepacket(data, length, ip_port)) { //unhandled packet @@ -172,11 +178,14 @@ int main(int argc, char *argv[]) printf("Received handled packet with length: %u\n", length); } } +*/ + networking_poll(); + print_clientlist(); print_friendlist(); c_sleep(300); } shutdown_networking(); - return 0; + return 0; } -- cgit v1.2.3