summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-06-24 07:26:30 -0400
committerirungentoo <irungentoo@gmail.com>2013-06-24 07:26:30 -0400
commitbaf14f81211dbc63aac13d76ef0fbbacc3391950 (patch)
treed9856a0c45714b2e5906ff5af012f570d884a4f0 /core
parent25f5af009f605260a3cd0fdee671945118dfdaac (diff)
Merged "wxWidgets VS template for windows" from juryben
That big 40MB file is useless so I merged the repos in a way that it dissapears forever from the main repo.
Diffstat (limited to 'core')
-rw-r--r--core/DHT.c14
-rw-r--r--core/DHT.h11
2 files changed, 12 insertions, 13 deletions
diff --git a/core/DHT.c b/core/DHT.c
index 1b82b860..c6ea6a22 100644
--- a/core/DHT.c
+++ b/core/DHT.c
@@ -16,10 +16,10 @@ int ping(IP_Port ip_port)
16 char data[37]; 16 char data[37];
17 data[0] = 00; 17 data[0] = 00;
18 memcpy(data + 5, self_client_id, 32); 18 memcpy(data + 5, self_client_id, 32);
19 ADDR addr = {.family = AF_INET, .ip = ip_port.ip, .port = ip_port.port}; 19//ADDR addr = {.family = AF_INET, .ip = ip_port.ip, .port = ip_port.port};
20 20
21 return sendto(sock, data, sizeof(data) - 1, 0, (struct sockaddr *)&addr, addrlen); 21//return sendto(sock, data, sizeof(data) - 1, 0, (struct sockaddr *)&addr, addrlen);
22 //sendto(int socket_descriptor, char *buffer, int buffer_length, int flags, struct sockaddr *destination_address, int address_length); 22 //sendto(int socket_descriptor, char *buffer, int buffer_length, int flags, struct sockaddr *destination_address, int address_length);
23} 23}
24 24
25 25
@@ -36,7 +36,7 @@ void addfriend(char * client_id)
36 36
37 37
38 38
39char delfriend(char * client_id); 39char delfriend(char * client_id)
40{ 40{
41 41
42 42
@@ -60,8 +60,7 @@ IP_Port getfriendip(char * client_id)
60 60
61void DHT_recvpacket(char * packet, uint32_t length) 61void DHT_recvpacket(char * packet, uint32_t length)
62{ 62{
63 63
64
65} 64}
66 65
67 66
@@ -83,4 +82,5 @@ void bootstrap(IP_Port ip_port)
83 82
84 83
85 84
86} \ No newline at end of file 85}
86
diff --git a/core/DHT.h b/core/DHT.h
index f1d2e5ae..f0ccd184 100644
--- a/core/DHT.h
+++ b/core/DHT.h
@@ -4,13 +4,10 @@
4#include <string.h> 4#include <string.h>
5#include <time.h> 5#include <time.h>
6 6
7#ifdef WIN32 7#ifdef WIN32 //Put win32 includes here
8 8
9
10//Put win32 includes here
11#include <windows.h>
12#include <winsock2.h> 9#include <winsock2.h>
13 10#include <windows.h>
14 11
15#else //Linux includes 12#else //Linux includes
16 13
@@ -116,4 +113,6 @@ uint16_t num_friends;
116//TODO: make this more efficient looping up to 128 times is a bit... 113//TODO: make this more efficient looping up to 128 times is a bit...
117Pinged pings[128]; 114Pinged pings[128];
118 115
119Pinged send_nodes[64]; \ No newline at end of file 116Pinged send_nodes[64];
117
118