mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
TODO updated.
This commit is contained in:
parent
1767fd574e
commit
c86c1c8132
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -80,7 +80,7 @@ typedef struct
|
|||
uint64_t current_time();
|
||||
|
||||
//return a random number
|
||||
int random_int();
|
||||
uint32_t random_int();
|
||||
|
||||
//Basic network functions:
|
||||
|
||||
|
|
|
@ -15,6 +15,11 @@ Things to do now:
|
|||
|
||||
-Add NaCl to our build system.
|
||||
|
||||
-Make NaCl work on windows
|
||||
The randombytes function for example in NaCl needs to be ported to windows (it works by reading bytes from /dev/urandom)
|
||||
The first result on google for how to compile it on windows replaces /dev/urandom with rand() (DO NOT DO THIS)
|
||||
Instead replace it with RtlGenRandom() or rand_s().
|
||||
|
||||
-Crypto (In progress)
|
||||
|
||||
-Find and fix bugs in the code.
|
||||
|
|
Loading…
Reference in New Issue
Block a user