UDP Server
Overview
The UDP server is one of the three real-time communication servers provided by Diarkis.
It can expose built-in commands of pre-prepared modules to clients, as well as implement and expose custom commands.
A command is a formatted packet sent from the client and processed by the server. Using commands, the Diarkis server cluster interacts with the client.
Setting Up the UDP Server
To expose built-in commands to the client, you can set up using the diarkisexec
package.
You can expose built-in commands by specifying the module with
diarkisexec.SetupDiarkis()
. Customize the configuration by specifying theConfigPath
of each module.You can expose custom commands with
diarkisexec.SetServerCommandHandler()
.You can set up the UDP server with
diarkisexec.SetupDiarkisUDPServer()
. Customize the server settings with a JSON file passed as an argument.
For more details, refer to the diarkisexec API reference.
Mesh Configuration
Specify the path to the JSON file in meshConfigPath
. For more details, refer to #mesh-she-ding.
UDP Server Configuration
The configuration is written in JSON.
For more details, refer to the server API reference.
最終更新