Request host: [string] listen: [string] pid: [string] callback: [block]. | Manual

Request host: [string] listen: [string] pid: [string] callback: [block].

Sets up Storm Server. Storm Server is an SCGI server. Both the Request Object Plugin and Storm Server are based on S. Losen's CCGI library (http://libccgi.sourceforge.net/doc.html) licensed LGPL. To set up a Storm Server, specify host (i.e. 'localhost'), a port to listen to (i.e. 9000) a pid file '/var/run/mypid.pid' and a callback block.
Usage:


 Request host:'localhost' listen:4000 pid:'/var/run/storm.pid' callback: {
  Pen write: 'Content-type: text/html\\n\\n'.
  var fname  := Command env: 'DOCUMENT_URI'.
  var script := File new: '/var/www/webapp'+fname.
  script include.
 }.
 
 Here we set up a server listening to port 4000. The callback prints out
 the content type header. Then, we extract the DOCUMENT URI, i.e. '/hello.ctr'
 and map this to a path '/var/www/webapp/hello.ctr'
 
 By default there is no output buffering, either create another callback or
 simply override the '<' or 'Pen' object to buffer instead of outputting
 directly.

back to homepage
back to manual menu

This API reference guide has been generated automatically from source code comments using the shtml.ctr script.