Portability | non-portable (uses FFI) |
---|---|
Stability | experimental |
Maintainer | michael@snoyman.com |
Hack.Handler.FastCGI
Description
Interface for FastCGI http://fastcgi.com/, using the fcgiapp API. Totally ripped off by Michael Snoyman to work with Hack.
- runFastCGIorCGI :: Application -> IO ()
- runOneFastCGIorCGI :: Application -> IO Bool
- runFastCGI :: Application -> IO ()
- runOneFastCGI :: Application -> IO ()
- runFastCGIConcurrent :: Int -> Application -> IO ()
- runFastCGIConcurrent' :: (IO () -> IO a) -> Int -> Application -> IO ()
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.
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
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.