Sock-CGI
Sock-CGI is an
implementation of pseudo-fastCGI for
webservers missing fastCGI.
It basically uses a socket to relay requests to a THT server.
This allow THT to be run as a server and thus enables Stay-Resident pages.
The relay is tried first and if that fails the server is started followed by a resend. This
requires a web server with write permissions to the log
or piddir directory for the pid file.
Alternatively, set the piddir to a writable directory.
As with fcgi.tcl, you can replicate this file with different ports for
multiple tht instances. Add the following to httpd.conf or .htaccess:
AddHandler tht-script .tht
Action tht-script /cgi-bin/Mod/tht/sock-cgi.tcl
Note: the approach used is optimistic with little in the way of error checking.
It also suffers from the performance penalty of exec, tclsh, ... etc, etc.
On the other hand, it should work with any CGI web-server where Tcl is around.
© 2008 Peter MacDonald