TrinityCore
Trinity Daemon

Files

file  CliRunnable.cpp
 
file  CliRunnable.h
 
file  Main.cpp
 

Classes

class  FreezeDetector
 

Macros

#define _TRINITY_CORE_CONFIG   "worldserver.conf"
 
#define _TRINITY_CORE_CONFIG_DIR   "worldserver.conf.d"
 

Functions

static void PrintCliPrefix ()
 
void utf8print (void *, std::string_view str)
 
void commandFinished (void *, bool)
 
void CliThread ()
 Thread start More...
 
void SignalHandler (boost::system::error_code const &error, int signalNumber)
 
AsyncAcceptorStartRaSocketAcceptor (Trinity::Asio::IoContext &ioContext)
 
bool StartDB ()
 Initialize connection to the databases. More...
 
void StopDB ()
 
void WorldUpdateLoop ()
 
void ClearOnlineAccounts ()
 Clear 'online' status for all accounts with characters in this realm. More...
 
void ShutdownCLIThread (std::thread *cliThread)
 
bool LoadRealmInfo ()
 
variables_map GetConsoleArguments (int argc, char **argv, fs::path &configFile, fs::path &configDir, std::string &winServiceAction)
 
int main (int argc, char **argv)
 Launch the Trinity server. More...
 
static void FreezeDetector::Handler (std::weak_ptr< FreezeDetector > freezeDetectorRef, boost::system::error_code const &error)
 

Variables

static constexpr char CLI_PREFIX [] = "TC> "
 

Detailed Description

Macro Definition Documentation

◆ _TRINITY_CORE_CONFIG

#define _TRINITY_CORE_CONFIG   "worldserver.conf"

Definition at line 74 of file Main.cpp.

◆ _TRINITY_CORE_CONFIG_DIR

#define _TRINITY_CORE_CONFIG_DIR   "worldserver.conf.d"

Definition at line 78 of file Main.cpp.

Function Documentation

◆ ClearOnlineAccounts()

void ClearOnlineAccounts ( )

Clear 'online' status for all accounts with characters in this realm.

Definition at line 687 of file Main.cpp.

+ Here is the caller graph for this function:

◆ CliThread()

void CliThread ( )

Thread start

Definition at line 108 of file CliRunnable.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ commandFinished()

void commandFinished ( void *  ,
bool   
)

Definition at line 86 of file CliRunnable.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetConsoleArguments()

variables_map GetConsoleArguments ( int  argc,
char **  argv,
fs::path &  configFile,
fs::path &  configDir,
std::string &  winServiceAction 
)

Definition at line 701 of file Main.cpp.

+ Here is the call graph for this function:

◆ Handler()

void FreezeDetector::Handler ( std::weak_ptr< FreezeDetector freezeDetectorRef,
boost::system::error_code const &  error 
)
static

Definition at line 576 of file Main.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadRealmInfo()

bool LoadRealmInfo ( )

Definition at line 627 of file Main.cpp.

+ Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char **  argv 
)

Launch the Trinity server.

worldserver PID file creation

  • Clean database before leaving

Definition at line 133 of file Main.cpp.

+ Here is the call graph for this function:

◆ PrintCliPrefix()

static void PrintCliPrefix ( )
inlinestatic

Definition at line 38 of file CliRunnable.cpp.

+ Here is the caller graph for this function:

◆ ShutdownCLIThread()

void ShutdownCLIThread ( std::thread *  cliThread)

Definition at line 454 of file Main.cpp.

+ Here is the caller graph for this function:

◆ SignalHandler()

void SignalHandler ( boost::system::error_code const &  error,
int  signalNumber 
)

Definition at line 570 of file Main.cpp.

+ Here is the call graph for this function:

◆ StartDB()

bool StartDB ( )

Initialize connection to the databases.

  • Get the realm Id from the configuration file
  • Clean the database before starting
  • Insert version info into DB

Definition at line 639 of file Main.cpp.

+ Here is the call graph for this function:

◆ StartRaSocketAcceptor()

AsyncAcceptor * StartRaSocketAcceptor ( Trinity::Asio::IoContext ioContext)

Definition at line 610 of file Main.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StopDB()

void StopDB ( )

Definition at line 676 of file Main.cpp.

+ Here is the call graph for this function:

◆ utf8print()

void utf8print ( void *  ,
std::string_view  str 
)

Definition at line 74 of file CliRunnable.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WorldUpdateLoop()

void WorldUpdateLoop ( )

Definition at line 519 of file Main.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ CLI_PREFIX

constexpr char CLI_PREFIX[] = "TC> "
staticconstexpr

Definition at line 36 of file CliRunnable.cpp.