# Module Netcgi_fcgi_10

    module Netcgi_fcgi_10: sig .. end

Low-level FastCGI Wire Protocol

This code is copyright 2003 Eric Stokes, and may be used under either, the GNU GPL, or the same license as ocamlnet
This module impliments the low level fastcgi wire protocal. It exports simple functions to interact with the web server much as a standard cgi script would (eg. fastcgi_write_stdout, fastcgi_write_stderr), this is one of the design goals of the fastcgi protocal. This module is marginally usefull for making low level web apps by itself, though you should not mix calls to fcgi_write_* with transactional buffered output, unless you really like your, your helpdesk operators :P

    exception FCGI_error of string * exn

`type ``fcgiHeader = {`

`` | `version : `int`;`
`` | `rtype : `int`;`
`` | `requestid : `int`;`
`` | `contentlen : `int`;`
`` | `padlen : `int`;`

}
`type ``fcgiBeginRequestBody = {`

`` | `role : `int`;`
`` | `flags : `int`;`

}
`type ``fcgiEndRequestBody = {`

`` | `astatus : `int`;`
`` | `pstatus : `int`;`

}
`type ``fcgiRequest = {`

`` | `id : `int`;`
`` | `app_type : `int`;`
`` | `params : `(string * string) list`;`
`` | `stdin : `string`;`
`` | `data : `string`;`
`` | `con : `Unix.file_descr`;`

}

    val fcgi_accept : unit -> fcgiRequest

    val fcgi_destroy : fcgiRequest -> unit

    val fcgi_write_stdout : fcgiRequest -> string -> unit

    val fcgi_write_stderr : fcgiRequest -> string -> unit

    val fcgi_write_end_request : fcgiRequest -> fcgiEndRequestBody -> unit