#include #include #include #include #include "network_manager.h" #include "net/constants.h" const std::string DB_FILE = "bettola.db"; int main(int argc, char** argv) { try { /* We'll keep main thread alive while server runs in background. */ NetworkManager server(DB_FILE); server.start(MULTIPLAYER_PORT); while(true) { std::this_thread::sleep_for(std::chrono::seconds(1)); } } catch(const std::exception& e) { fprintf(stderr, "Main exception: %s\n", e.what()); return 1; } return 0; }