From c86c1c8132a0d910cdb314798804d5fe0b270179 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Wed, 3 Jul 2013 09:45:01 -0400 Subject: TODO updated. --- core/Lossless_UDP.c | 4 ++-- core/Lossless_UDP.h | 5 +++++ core/network.c | 4 ++-- core/network.h | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) (limited to 'core') 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 @@ - //maximum data packets in sent and recieve queues. +//maximum data packets in sent and recieve queues. #define MAX_QUEUE_NUM 16 //maximum length of the data in the data packets -#define MAX_DATA_SIZE 1024 +//#define MAX_DATA_SIZE 1024 //defined in Lossless_UDP.h //maximum number of data packets in the buffer #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 @@ #include "network.h" +//maximum length of the data in the data packets +#define MAX_DATA_SIZE 1024 + + + //Functions //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() } -int random_int() +uint32_t random_int() { #ifdef WIN32 - //TODO replace rand with a more random windows function + //TODO replace rand with something cryptograhically secure return rand(); #else 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 uint64_t current_time(); //return a random number -int random_int(); +uint32_t random_int(); //Basic network functions: -- cgit v1.2.3