Constructor

new (server:Server)

Fields

Methods

inline addModule (m:Dynamic):Void

Adds initialized module to list.

inline addNoLoginRequests (list:Array<String>):Void

Client request types that are given as a parameter will not require client login to work.

Parameters:

list

Client request types in the <module>.<name> format.

inline debug (source:String, msg:String):Void

inline error (source:String, msg:String):Void

inline getClientInternal (id:Int):ClientInfo

Returns client by his name.

Note: Will only work correctly if all client names are unique!

Parameters:

name

Client name.

Returns:

Client. Returns null, if no such client is online.

getModule (name:String):Dynamic

Returns server module by its name.

Parameters:

name

Module name.

Returns:

Module. Null, if no such module found.

getSubscribedMethods (tag:String):Null<List<Dynamic>>

Returns a list of subscribed methods for a given event type. Module subscription API is described in detail in Subscriptions article.

Parameters:

tag

Event type.

Returns:

List of methods subscribed to this event type.

getSubscribedModules (tag:String):Null<_ModulesList>

Returns a list of subscribed modules for a given event type. Module subscription API is described in detail in Subscriptions article.

Parameters:

tag

Event type.

Returns:

List of modules subscribed to this event type.

dynamic initModules ():Void

Initializes project server modules. Intended to call addModule() or loadModules().

inline log (source:String, msg:String):Void

reload (params:Dynamic):Void

Reload all project modules. Called from editor/script notifications

subscribeMethod (tag:String, method:Dynamic):Void

Subscribes method to an event. Module subscription API is described in detail in Subscriptions article.

Parameters:

tag

Event type.

method

Method.

subscribeModule (tag:String, module:Dynamic):Void

Subscribes module to an event. Module subscription API is described in detail in Subscriptions article.

Parameters:

tag

Event type.

module

Server module.