RunWebHareService (open)
Launch a WebHare service
Syntax
LOADLIB "mod::system/lib/services.whlib";
MACRO RunWebHareService(STRING servicename, FUNCTION PTR constructor, RECORD options)Parameters
STRING servicenameName of the service (should follow the 'module:tag' pattern)
FUNCTION PTR constructorConstructor to invoke for incoming connections. This object will be marshalled through OpenWebhareService
RECORD optionsOptions
BOOLEAN autorestartAutomatically restart the service if the source code has changed. Defaults to TRUE
BOOLEAN restartimmediatelyImmediately restart the service even if we stil have open connections. Defaults to FALSE
Description
Starts a WebHare service and pass the constructed objects to every incoming connection. The constructor can also be left empty - the service will then simply run until its shutdown or requires an autorestart. The call to RunWebhareService will never return.