-
Notifications
You must be signed in to change notification settings - Fork 1
Home
MasterServer is an All-in-One server container that performs specific actions to simplify creation of a Server.
It's a Module-based Server, that means that it will run any module specified in its ini file.
The build system is make with CMake and requires a GameProgressive Module Development Kit (MDK) to be setted up.
WARNING: Each module MUST BE CREATED with MDK otherwise they will not be loaded.
- Cross-platform. Works with Windows and POSIX systems.
- Automaticly fetch configuration from the INI file.
- Automaticly passes a connection to a Database, you don't need to make a connection for any Server again.
- Module based system. You could choose what to run.
- Extensible license. Create your modules even with closed source code.
It simply loads an exported C function with the name of "MDKModule".
int MDKModule(void* data)
the data parametra is a pointer to a ModuleMain
structure.
Due to the thread entrypoint design, you have to fetch the parametra manually.
typedef struct SModuleMain { char *ip; int port; ModuleConfigMap cfg; mdk_mysql mysql; } ModuleMain;
ip is the recommended ip that the program should use.
port is the recommended port that the program should use.
cfg is a map containing the module configuration. It can be used to fetch specific application configuration
mysql is a pointer to a MYSQL connection. KEEP IN MIND that the connection could be invalid.
There are also some error codes used in MDK to determine the error code, see MasterServerMDK.h for more information.
See this page for more information
Type 'help' to see a list of the avaiable commands with a description.