Undo all the work on determinism in the driver. New plan soon.
This commit is contained in:
@@ -2,11 +2,15 @@
|
||||
#define _WIN32_WINNT 0x0600
|
||||
|
||||
#include "driver.hpp"
|
||||
#include "umm-malloc.hpp"
|
||||
#include "driver-util.hpp"
|
||||
#include "util.hpp"
|
||||
#include "drivenengine.hpp"
|
||||
#include "dummycert.hpp"
|
||||
#include "util.hpp"
|
||||
#include "textgame.hpp"
|
||||
#include "lpxclient.hpp"
|
||||
#include "lpxserver.hpp"
|
||||
#include "drivertests.hpp"
|
||||
#include "source.hpp"
|
||||
#include <map>
|
||||
#include <iostream>
|
||||
#include <cstdio>
|
||||
@@ -25,6 +29,12 @@
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/pem.h>
|
||||
|
||||
#define CHBUF_SIZE (256*1024)
|
||||
#define POLLVEC_SIZE (DrivenEngine::MAX_CHAN+1)
|
||||
|
||||
static std::unique_ptr<char[]> chbuf;
|
||||
static std::unique_ptr<struct pollfd[]> pollvec;
|
||||
|
||||
static void set_nonblocking(SOCKET sock) {
|
||||
u_long mode = 1; // 1 to enable non-blocking socket
|
||||
int status = ioctlsocket(sock, FIONBIO, &mode);
|
||||
@@ -235,7 +245,6 @@ static int console_read(char *bytes, int nbytes) {
|
||||
}
|
||||
|
||||
void driver_sysinit(int argc, char *argv[]) {
|
||||
init_winsock();
|
||||
}
|
||||
|
||||
class MonoClock {
|
||||
@@ -257,4 +266,15 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
#include "driver-common.cpp"
|
||||
#include "driver-common.cpp"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
init_winsock();
|
||||
chbuf.reset(new char[CHBUF_SIZE]);
|
||||
pollvec.reset(new struct pollfd[POLLVEC_SIZE]);
|
||||
OPENSSL_init_ssl(0, NULL);
|
||||
initialize_engine();
|
||||
driver_drive(argc, argv);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user