httpstartsrv
| httpstartsrv | 
  Purpose
 
  Synopsis
 
procedure httpstartsrv
 procedure httpstartsrv(srvdir:string, moslab:string)
 
  Arguments
 
| 
     srvdir 
     | 
     Server directory
     | 
| 
     moslab 
     | 
     Label identifying commands
     | 
  Further information
 
 1. The server takes its configuration from the parameters
 http_defport,
 http_srvconfig,
 http_listen,
 http_maxreq and
 http_defpage.
 
 2. Only one server can be run by a model: if the server is already running, no operation is performed.
 
 3. The server processes only authorised request types (see
 http_srvconfig): the model is notified of every valid request by an event of class
 EVENT_HTTPNEW
 . Malformed or unauthorised requests are automatically rejected.
 
 4. When the function is used with arguments,
 srvdir designates a directory:
 mmhttp will act as a file server for the files stored in this directory (via
 GET queries). The argument
 moslab is a prefix that identifies requests that are to be handled by the model.
 
 5. An IO error is raised if the server cannot start because of a network setting (typically the TCP port is already used or requires higher privileges).
 
 6. If the parameter
 http_startwb is set to
 true a web browser (as defined by
 http_browser) is launched just after the server has started.
 
  Related topics
 
  Module
 
 
