mvm_gui_set_webserver_options — Set webserver options for a given server in JSON format.
mvm_gui_set_webserver_options( : : ServerHandle, JsonOptions : )
Set webserver options for a given server in JSON format. Multiple options can be specified as multiple key/values pairs within a single JSON object string representation.
Supported options are:
socketReceiveTimeout: The timeout for receiving data in milliseconds. The default is the system maximum integer value.
socketSendTimeout: The timeout for sending data in milliseconds. The default is the system maximum integer value.
watcherTimeoutMillis: Wait watcherTimeoutMillis milliseconds before triggering the system message '__fileChangesDetected' after a filesystem change event occured.
Use a value <= 0 to disable the file system watcher. The default value is 0 / disabled.
watcherExcludeDirs: Exclude these directories from the file system watcher.
ackTimeoutMillis: The timeout for receiving acknowledge messages in milliseconds. An acknowledge message is received from a client for each 'tuple' message sent from the server. Use a value <= 0 to disable waiting for acknowledge messages.
The default value is 250 milliseconds. Please note that if acknowledge messages are disabled the operator mvm_gui_get_ui will probably not return meaningful results.
rootDir: The root directory of the server. The specified string must be an absolute path to an existing directory or a path relative to the current working directory (see also set_current_dir). The directory is resolved immediately when
this option is specified. It is therefore OK to change the working directory afterwards.
File system watcher
The File system watcher installs an change event watcher on all files within the specified root directory of the webserver and for its subdirectories (recursive). If any file is modified while a webclient is connected, the
webclient will receive a '__fileChangesDetected' system message. The default JavaScript implementation then triggers a page reload (window.location.reload()). For example, this functionality can be used to see immediately the effect of an edit
of a HTML page. This functionality is disabled be default. It can be enabled by setting the option watcherTimeoutMillis as described above.
This operator modifies the state of the following input parameter:
The value of this parameter may not be shared across multiple threads without external synchronization.
ServerHandle (input_control, state is modified) serial → (handle)
GUI server handle
JsonOptions (input_control) string → (string)
options in JSON notation
mvm_gui_set_webserver_options (ServerHandle, '{"socketReceiveTimeout": 100000, "ackTimeoutMillis": 100}')
mvm_gui_set_webserver_options (ServerHandle, '{"watcherTimeoutMillis": 100, "ackTimeoutMillis": -1}')
Foundation