Added PRNG code

This commit is contained in:
mpc
2004-06-23 11:56:53 +00:00
committed by zzz
parent 52fd6ca513
commit 980c0aa1d7
10 changed files with 126 additions and 9 deletions

View File

@@ -31,8 +31,9 @@
#include "platform.hpp"
#include "main.hpp"
Logger logger(LOG_FILE);
Sam *sam;
Logger logger(LOG_FILE); // Logging mechanism
Random prng; // Random number generator
Sam *sam; // SAM connection
int main(int argc, char* argv[])
{
@@ -52,7 +53,7 @@ int main(int argc, char* argv[])
cerr << "SAM error: " << x.what() << '\n';
if (x.code() == SAM_SOCKET_ERROR) {
LERROR << "Check whether you have specified the correct SAM host " \
"and port number, and that\nI2P is running.\n";
"and port number, and that I2P is running.\n";
cerr << "Check whether you have specified the correct SAM host " \
"and port number, and that\nI2P is running.\n";
}
@@ -63,7 +64,7 @@ int main(int argc, char* argv[])
sam->read_buffer(); // wait until we get our own dest back from lookup
sam->peers->advertise_self();
while (true)
sam->read_buffer();