You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Arves100 edited this page Jul 5, 2018
·
4 revisions
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.
Features
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.
How the module is loaded?
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.