GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  FCGI::ASYNC::PSGI (3)

.ds Aq ’

NAME

"FCGI::Async::PSGI" - use "PSGI" applications with "FCGI::Async"

CONTENTS

SYNOPSIS



 use FCGI::Async::PSGI;
 use IO::Async::Loop;

 my $loop = IO::Async::Loop->new;

 my $fcgi = FCGI::Async::PSGI->new(
    port => 12345,
    app => sub {
       my $env = shift;

       return [
          200,
          [ "Content-Type" => "text/plain" ],
          [ "Hello, world!" ],
       ];
    },
 );

 $loop->add( $fcgi );

 $loop->loop_forever;



DESCRIPTION

This subclass of FCGI::Async allows a FastCGI responder to use a PSGI application to respond to requests. It acts as a gateway between the FastCGI connection from the webserver, and the PSGI application. Aside from the use of PSGI instead of the on_request callback, this class behaves similarly to FCGI::Async.

PARAMETERS

The following named parameters may be passed to new or configure:
app => CODE Reference to the actual PSGI application to use for responding to requests

PSGI ENVIRONMENT

The following extra keys are supplied to the environment of the PSGI app:
fcgi.async The FCGI::Async::PSGI object serving the request
fcgi.async.req The FCGI::Async::Request object representing this particular request
io.async.loop The IO::Async::Loop object that the FCGI::Async::PSGI object is a member of. This is also provided as fcgi.async.loop for backward-compatibility with version 0.21, but at some point will be removed.

SEE ALSO

o PSGI - Perl Web Server Gateway Interface Specification
o Plack::Handler::FCGI::Async - FastCGI handler for Plack using FCGI::Async

AUTHOR

Paul Evans <leonerd@leonerd.org.uk>
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 FCGI::ASYNC::PSGI (3) 2011-01-01

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.