Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1556 |
|
Package | utility | |
Module | tasking | |
Tool | servers |
The activate function creates a new server of the specified type, if necessary. A server is an executable piece of code that has been written to communicate with glish. This function will start the specified process on the specified computer or, by default, on the current computer ie., the one running glish.
This function will only create new server process if one is not already running on the specified computer. However this can be overridden.
This function returns a positive integer that can be used by other functions in this tool indicate which server process you are referring to.
Normally servers are terminated when empty ie., contains no tools. One can override this using the terminateonempty flag. Use this only for servers that are likely to be restarted soon to avoid the overhead for reloading the executable.
server | The name of the server to create | ||
Allowed: | a string | ||
Default: | no default | ||
host | The name of the computer on which to start the server | ||
Allowed: | any computer name | ||
Default: | an empty string | ||
forcenewserver | Start a new server even if one is running | ||
Allowed: | T or F | ||
Default: | F | ||
async | Start the server asynchronously | ||
Allowed: | T or F | ||
Default: | F | ||
terminateonempty | Terminate servers when empty | ||
Allowed: | Boolean | ||
Default: | T |
include 'servers.g'; private := [=]; private.serverid := defaultservers.activate('numerics'); private.toolid := defaultservers.create(private.serverid, 'fftserver');This will start up the numerics process on the current machine. It then creates a fftserver tool, using the default constructor, that uses this server. See also the example for the create function.