Help language development. Donate to The Perl Foundation

FastCGI::NativeCall::Async cpan:JSTOWE last updated on 2019-01-20
# FastCGI::NativeCall::Async

An asynchronous wrapper for [FastCGI::NativeCall](

[![Build Status](](

## Synopsis

use FastCGI::NativeCall::Async;

my $fna = => "/tmp/fastcgi.sock", backlog => 32 );

my $count = 0;

react {
    whenever $fna -> $fcgi {
	    say $fcgi.env;
        $fcgi.Print("Content-Type: text/html\r\n\r\n{++$count}");

## Description

The rationale behind this module is to help
play nicely in a larger program by managing the blocking accept loop as
a Supply that can for instance be used in a ```react``` block as above.
It doesn't actually allow more than one FastCGI request to be processed at
once for the same URI as the protocol itself precludes that.  However it
does allow more than one FastCGI handler to be present in the same Perl
6 program, potentially sharing data and other resources.

## Installation

You will need a working HTTP server that can handle FastCGI to be able to
use this properly.

Assuming you have a working Rakudo Perl installation you should be able to
install this with *zef* :

     zef install FastCGI::NativeCall::Async

     # Or from a local clone 

     zef install .

## Support

This module itself is fairly simple, but does depend on both other modules and the configuration of
of your HTTP Server.

Please send any suggestions/patches etc to

I'd be interested in working configurations for various HTTP servers.

## Licence & Copyright

This is free software see the [LICENCE](LICENCE) file in the distribution.

© 2017, 2019 Jonathan Stowe