Server: Difference between revisions
From Crumbled World Wiki
(Created page with "{{:ServerExampleCode}} ==Functions== {| class="wikitable" !|return !|function !|description |- | |enableNewConnections(bool set) |Enables or disable new clients to connect to server, new clients may only connect if server is running |- | |start() |Starts the server. The server it self may run on another machine or localy in a seperat thread |- | |stop() |Stops the server and kicks all connect...") |
(No difference)
|
Latest revision as of 14:25, 5 July 2025
Functions
| return | function | description |
|---|---|---|
| enableNewConnections(bool set) | Enables or disable new clients to connect to server, new clients may only connect if server is running | |
| start() | Starts the server. The server it self may run on another machine or localy in a seperat thread | |
| stop() | Stops the server and kicks all connected from it. | |
| addToGlobalServerList(string serverName) | Add server to global server list. This will make this server more public and accessible for other players. The server will be on the list for a maximum 30 min then this server need to call this function again. | |
| removeFromGlobalServerList() | Remove this server from the global server list. Will remove the server based on ip and port number. |