![]() |
ConnectX 3.0
ConnectX Game Suite
|
#include <csignal>#include <cstdlib>#include <iostream>#include <string>#include <thread>#include <spdlog/sinks/basic_file_sink.h>#include <spdlog/sinks/stdout_color_sinks.h>#include <spdlog/spdlog.h>#include "protocol/protocol.hpp"#include "server/game_server.hpp"#include <fcntl.h>#include <sys/stat.h>#include <sys/types.h>#include <unistd.h>
Functions | |
| void | daemonize () |
| void | setupLogger (spdlog::level::level_enum console_log_level, spdlog::level::level_enum file_log_level=spdlog::level::debug) |
| void | parseArguments (int argc, char *argv[], uint16_t &port, bool &run_as_daemon) |
| void | printUsage (const char *program_name) |
| int | runServer (uint16_t port) |
| Start the game server logic. | |
| void | signalHandler (int signal) |
| int | main (int argc, char *argv[]) |
Variables | |
| GameServer * | game_server = nullptr |
| void daemonize | ( | ) |
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
| void parseArguments | ( | int | argc, |
| char * | argv[], | ||
| uint16_t & | port, | ||
| bool & | run_as_daemon | ||
| ) |
| void printUsage | ( | const char * | program_name | ) |
Print usage information
| int runServer | ( | uint16_t | port | ) |
Start the game server logic.
| void setupLogger | ( | spdlog::level::level_enum | console_log_level, |
| spdlog::level::level_enum | file_log_level = spdlog::level::debug |
||
| ) |
| void signalHandler | ( | int | signal | ) |
Signal handler for graceful shutdown
| GameServer* game_server = nullptr |