| FCGI::Async::PSGI(3pm) | User Contributed Perl Documentation | FCGI::Async::PSGI(3pm) |
"FCGI::Async::PSGI" - use "PSGI" applications with "FCGI::Async"
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;
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".
The following named parameters may be passed to "new" or "configure":
The following extra keys are supplied to the environment of the "PSGI" app:
Paul Evans <leonerd@leonerd.org.uk>
| 2021-01-09 | perl v5.32.0 |