RunWebHareService (open)

Launch a WebHare service

Syntax

LOADLIB "mod::system/lib/services.whlib";

MACRO RunWebHareService(STRING servicename, FUNCTION PTR constructor, RECORD options)

Parameters

STRING servicename

Name of the service (should follow the 'module:tag' pattern)

FUNCTION PTR constructor

Constructor to invoke for incoming connections. This object will be marshalled through OpenWebhareService

RECORD options

Options

BOOLEAN autorestart

Automatically restart the service if the source code has changed. Defaults to TRUE

BOOLEAN restartimmediately

Immediately 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.