ConnectX 3.0
ConnectX Game Suite
Loading...
Searching...
No Matches
main.cpp File Reference
#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>
Include dependency graph for network/server/app/main.cpp:

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

GameServergame_server = nullptr
 

Function Documentation

◆ daemonize()

void daemonize ( )

◆ main()

int main ( int  argc,
char *  argv[] 
)

◆ parseArguments()

void parseArguments ( int  argc,
char *  argv[],
uint16_t &  port,
bool &  run_as_daemon 
)

◆ printUsage()

void printUsage ( const char *  program_name)

Print usage information

◆ runServer()

int runServer ( uint16_t  port)

Start the game server logic.

◆ setupLogger()

void setupLogger ( spdlog::level::level_enum  console_log_level,
spdlog::level::level_enum  file_log_level = spdlog::level::debug 
)

◆ signalHandler()

void signalHandler ( int  signal)

Signal handler for graceful shutdown

Variable Documentation

◆ game_server

GameServer* game_server = nullptr