[ Home Page ] [ Eiffel Archive ] [ Eiffel Classes and Clusters]
![]() |
Small-FCGI: SmallEiffel Bindings for Fast CGI |
Written by Lyn Headley.
Version 1.0
Small-FCGI-0_1.tar.gz (54,000 bytes) - source code
laheadle@cs.uchicago.edu Lyn Headley (maintainer) mail address.
class interface FCGI
-- FIXME: add DBC
feature(s) from FCGI
-- basic FCGI functionality
fcgi_accept: INTEGER
-- accept fastcgi connection
fcgi_finish
-- finish fastcgi connection
fcgi_flush
-- flush fastcgi output/error
fcgi_print (str: STRING)
-- print str to "standard output"
fcgi_warn (str: STRING)
-- print str to "standard error"
fcgi_read (amount: INTEGER): STRING
-- read amount characters from "standard input"
fcgi_getenv (var: STRING): STRING
-- get the value of the named environment variable
feature(s) from FCGI
-- higher level services
getenv_integer (var: STRING): INTEGER
-- fetch and convert environment variable
-- returns 0 on failure (bad idea?)
end of FCGI
and here is an example showing how it might be used.
class FCGI_TEST
inherit
FCGI
creation
make
feature
make is
local
read_str: STRING
content_length: INTEGER
do
from
until
fcgi_accept < 0
loop
-- this should appear in the logs
fcgi_warn("Accepted -- YEAH! %N")
content_length := getenv_integer("CONTENT_LENGTH")
fcgi_print("Content-type: text/html%R%N%R%N")
fcgi_print("TESTING<br>%N")
fcgi_print("Content Length: ")
fcgi_print(content_length.to_string)
fcgi_print("<br>%N")
if content_length > 0 then
read_str := fcgi_read(content_length)
fcgi_print("Content: ")
fcgi_print(read_str)
fcgi_print("%N")
end -- if
end -- loop
end -- make
end -- class FCGI_TEST
There are more docs at www.fastcgi.com
I appreciate feedback.
Lyn Headley: laheadle@cs.uchicago.edu
Homepage: http://www.cs.uchicago.edu/~laheadle/Small-FCGI/
07 September 1999 (Added to Eiffel Forum Archive: 23 December 1999)
[ Home Page ] [ Eiffel Archive ] [ Eiffel Classes and Clusters]