summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-07-03 09:45:01 -0400
committerirungentoo <irungentoo@gmail.com>2013-07-03 09:45:01 -0400
commitc86c1c8132a0d910cdb314798804d5fe0b270179 (patch)
tree00499300b9948fa12a4bf0385ce9beecb951db6a /core
parent1767fd574e11c6ae8ef549f51e8a5b9eef1c6f88 (diff)
TODO updated.
Diffstat (limited to 'core')
-rw-r--r--core/Lossless_UDP.c4
-rw-r--r--core/Lossless_UDP.h5
-rw-r--r--core/network.c4
-rw-r--r--core/network.h2
4 files changed, 10 insertions, 5 deletions
diff --git a/core/Lossless_UDP.c b/core/Lossless_UDP.c
index bf9fa893..7513e5b4 100644
--- a/core/Lossless_UDP.c
+++ b/core/Lossless_UDP.c
@@ -27,11 +27,11 @@
27 27
28 28
29 29
30 //maximum data packets in sent and recieve queues. 30//maximum data packets in sent and recieve queues.
31#define MAX_QUEUE_NUM 16 31#define MAX_QUEUE_NUM 16
32 32
33//maximum length of the data in the data packets 33//maximum length of the data in the data packets
34#define MAX_DATA_SIZE 1024 34//#define MAX_DATA_SIZE 1024 //defined in Lossless_UDP.h
35 35
36//maximum number of data packets in the buffer 36//maximum number of data packets in the buffer
37#define BUFFER_PACKET_NUM (16-1) 37#define BUFFER_PACKET_NUM (16-1)
diff --git a/core/Lossless_UDP.h b/core/Lossless_UDP.h
index 91e71019..8bdeb43e 100644
--- a/core/Lossless_UDP.h
+++ b/core/Lossless_UDP.h
@@ -28,6 +28,11 @@
28#include "network.h" 28#include "network.h"
29 29
30 30
31//maximum length of the data in the data packets
32#define MAX_DATA_SIZE 1024
33
34
35
31//Functions 36//Functions
32 37
33//initialize a new connection to ip_port 38//initialize a new connection to ip_port
diff --git a/core/network.c b/core/network.c
index e7999416..35257d54 100644
--- a/core/network.c
+++ b/core/network.c
@@ -40,10 +40,10 @@ uint64_t current_time()
40 40
41} 41}
42 42
43int random_int() 43uint32_t random_int()
44{ 44{
45 #ifdef WIN32 45 #ifdef WIN32
46 //TODO replace rand with a more random windows function 46 //TODO replace rand with something cryptograhically secure
47 return rand(); 47 return rand();
48 #else 48 #else
49 return random(); 49 return random();
diff --git a/core/network.h b/core/network.h
index da92837d..f84ceccb 100644
--- a/core/network.h
+++ b/core/network.h
@@ -80,7 +80,7 @@ typedef struct
80uint64_t current_time(); 80uint64_t current_time();
81 81
82//return a random number 82//return a random number
83int random_int(); 83uint32_t random_int();
84 84
85//Basic network functions: 85//Basic network functions:
86 86