This site's content was compiled from 1993 to 2006. Beyond that, Google is your friend.

Small-FCGI

Maintainer

Lyn Headley

Description

Small-FCGI is a set of SmallEiffel bindings for the Fast CGI web architecture.

The Fast CGI protocol allows for the creation of high-performance web applications by greatly reducing program initialization time, an inherent performance bottleneck in short-lived CGI programs. In contrast to CGI programs, Fast CGI servers are persistent. Therefore, expensive initialization procedures can be performed once, at application start-up time. The effect on performance can be tremendous!

Categories

Versions

Links

Features

It's a simple interface, so there's not much to document. Here is the short form of the base class FCGI:

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

Example


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

Supported compilers

Platforms

Licensing

Dependencies

Packages using Small-FCGI

Google
 
Web eiffelzone.com