README

FastCGI::NativeCall::Async

An asynchronous wrapper for FastCGI::NativeCall

image i_github_com_jonathanstowe_fastcgi_nativecall_async_workflows_ci_badge_svg not found

Synopsis

use FastCGI::NativeCall::Async;

my $fna = FastCGI::NativeCall::Async.new(path => "/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 FastCGI::NativeCall 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 Raku 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 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 github

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

Licence & Copyright

This is free software see the LICENCE file in the distribution.

Ā© 2017 - 2021 Jonathan Stowe

FastCGI::NativeCall::Async v0.0.6

A reactive wrapper for FastCGI::NatveCalll

Authors

License

Artistic-2.0

Dependencies

FastCGI::NativeCall

Test Dependencies

Provides

  • FastCGI::NativeCall::Async

Documentation

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.