hack-handler-fastcgi-0.0.0: Hack handler direct to fastcgi

Portabilitynon-portable (uses FFI)
Stabilityexperimental
Maintainermichael@snoyman.com

Hack.Handler.FastCGI

Contents

Description

Interface for FastCGI http://fastcgi.com/, using the fcgiapp API. Totally ripped off by Michael Snoyman to work with Hack.

Synopsis

Single-threaded interface

runFastCGIorCGI :: Application -> IO ()Source

Handle a single CGI request, or FastCGI requests in an infinite loop. This function only returns normally if it was a CGI request. This lets you use the same program as either a FastCGI or CGI program, depending on what the server treats it as.

runOneFastCGIorCGISource

Arguments

:: Application 
-> IO Bool

True if it was a FastCGI request, False if CGI.

Handle a single FastCGI or CGI request. This lets you use the same program as either a FastCGI or CGI program, depending on what the server treats it as.

runFastCGI :: Application -> IO ()Source

Handle FastCGI requests in an infinite loop.

runOneFastCGI :: Application -> IO ()Source

Handle a single FastCGI request.

Concurrent interface

runFastCGIConcurrentSource

Arguments

:: Int

Max number of concurrent threads.

-> Application 
-> IO () 

Like Network.CGI.runCGI, but uses the FastCGI interface and forks off a new thread (using forkOS) for every request.

runFastCGIConcurrent'Source

Arguments

:: (IO () -> IO a)

How to fork a request.

-> Int

Max number of concurrent threads.

-> Application 
-> IO ()