Filewatcher File Search File Search
Content Search
» » » » » libfcgi-perl_0.74-1+b1_mipsel.deb » Content »
pkg://libfcgi-perl_0.74-1+b1_mipsel.deb:38876/usr/share/man/man3/  info  control  downloads

libfcgi-perl - helper module for FastCGI…  more info»


FCGI(3pm)        User Contributed Perl Documentation       FCGI(3pm)

       FCGI - Fast CGI module

           use FCGI;

           my $count = 0;
           my $request = FCGI::Request();

           while($request->Accept() >= 0) {
               print("Content-type: text/html\r\n\r\n", ++$count);


           Creates a request handle. It has the following optional

           input perl file handle (default: \*STDIN)
           output perl file handle (default: \*STDOUT)
           error perl file handle (default: \*STDERR)
                   These filehandles will be setup to act as
                   input/output/error on successful Accept.

           environment hash reference (default: \%ENV)
                   The hash will be populated with the environment.

           socket (default: 0)
                   Socket to communicate with the server.  Can be
                   the result of the OpenSocket function.  For the
                   moment, it's the file descriptor of the socket
                   that should be passed. This may change in the

                   You should only use your own socket if your
                   program is not started by a process manager such
                   as mod_fastcgi (except for the
                   FastCgiExternalServer case) or cgi-fcgi.  If you
                   use the option, you have to let your FastCGI
                   server know which port (and possibly server) your
                   program is listening on.  See for an

           flags (default: 0)
                   Possible values:

                               If set, Accept will fail if
                               interrupted.  It not set, it will
                               just keep on waiting.

           Example usage:
               my $req = FCGI::Request;

               my %env;
               my $in = new IO::Handle;
               my $out = new IO::Handle;
               my $err = new IO::Handle;
               my $req = FCGI::Request($in, $out, $err, \%env);

       FCGI::OpenSocket(path, backlog)
           Creates a socket suitable to use as an argument to

           path    Pathname of socket or colon followed by local tcp
                   port.  Note that some systems take file
                   permissions into account on Unix domain sockets,
                   so you'll have to make sure that the server can
                   write to the created file, by changing the umask
                   before the call and/or changing permissions
                   and/or group of the file afterwards.

           backlog Maximum length of the queue of pending
                   connections.  If a connection request arrives
                   with the queue full the client may receive an
                   error  with  an  indication of ECONNREFUSED.

           Close a socket opened with OpenSocket.

           Accepts a connection on $req, attaching the filehandles
           and populating the environment hash.  Returns 0 on
           success.  If a connection has been accepted before, the
           old one will be finished first.

           Note that unlike with the old interface, no die and warn
           handlers are installed by default. This means that if you
           are not running an sfio enabled perl, any warn or die
           message will not end up in the server's log by default.
           It is advised you set up die and warn handlers yourself.
  contains an example of die and warn handlers.

           Finishes accepted connection.  Also detaches filehandles.

           Flushes accepted connection.

           Temporarily detaches filehandles on an accepted

           Re-attaches filehandles on an accepted connection.

           Tells the library not to accept any more requests on this
           handle.  It should be safe to call this method from
           signal handlers.

           Note that this method is still experimental and
           everything about it, including its name, is subject to

       $env = $req->GetEnvironment()
           Returns the environment parameter passed to

       ($in, $out, $err) = $req->GetHandles()
           Returns the file handle parameters passed to

       $isfcgi = $req->IsFastCGI()
           Returns whether or not the program was run as a FastCGI.

LIMITATIONS isn't Unicode aware, only characters within the range
       0x00-0xFF are supported. Attempts to output strings
       containing characters above 0xFF results in a exception: (F)
       "Wide character in %s".

       Users who wants the previous ( <= 0.68) incorrect
       behavior can disable the exception by using the "bytes"

               use bytes;
               print "\x{263A}";

       Sven Verdoolaege <>

perl v5.14.2                 2011-11-15                    FCGI(3pm)
Results 1 - 1 of 1
Help - FTP Sites List - Software Dir.
Search over 15 billion files
© 1997-2017