Command group | Flag affected | Reversible | Execute on client | Platform(s) |
---|---|---|---|---|
Threads | YES | NO | NO | All |
Start server {stack-initialization-method (parameters)}
Start server starts the multi-threaded Web Client server. It creates the client method stacks and their associated threads, and starts the thread which listens for client requests. You use the property $root.$prefs.$serverstacks to specify the number of method stacks to be created.
Start server takes an optional stack-initialization-method and its parameter-list as parameters. If you specify the stack-initialization-method, Start server pushes this method on to every client method stack and allows it to execute, so that it can be used to initialize the state of the method stacks (so if $serverstacks is 5 it will execute five times).
The command clears the flag if it is used in a single threaded Omnis, or the serial number does not allow clients to connect. It generates a fatal error if for some other reason it is not possible to create the stacks and threads and start the listener.
Start server
If flag false
OK message {Failed to start multithreaded server}
End If