1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="Netcgi_jserv_app.html">
<link rel="next" href="Netcgi_fcgi.html">
<link rel="Up" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of class methods" rel=Appendix href="index_methods.html">
<link title="Index of classes" rel=Appendix href="index_classes.html">
<link title="Index of class types" rel=Appendix href="index_class_types.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Netcgi_env" rel="Chapter" href="Netcgi_env.html">
<link title="Netcgi_types" rel="Chapter" href="Netcgi_types.html">
<link title="Netcgi" rel="Chapter" href="Netcgi.html">
<link title="Netcgi_jserv" rel="Chapter" href="Netcgi_jserv.html">
<link title="Netcgi_jserv_ajp12" rel="Chapter" href="Netcgi_jserv_ajp12.html">
<link title="Netcgi_jserv_app" rel="Chapter" href="Netcgi_jserv_app.html">
<link title="Netcgi_fcgi_10" rel="Chapter" href="Netcgi_fcgi_10.html">
<link title="Netcgi_fcgi" rel="Chapter" href="Netcgi_fcgi.html">
<link title="Netcgi1_compat" rel="Chapter" href="Netcgi1_compat.html"><title>Ocamlnet 2 Reference Manual (netcgi1 add-on) : Netcgi_fcgi_10</title>
</head>
<body>
<div class="navbar"><a href="Netcgi_jserv_app.html">Previous</a>
<a href="index.html">Up</a>
<a href="Netcgi_fcgi.html">Next</a>
</div>
<center><h1>Module <a href="type_Netcgi_fcgi_10.html">Netcgi_fcgi_10</a></h1></center>
<br>
<pre><span class="keyword">module</span> Netcgi_fcgi_10: <code class="code">sig</code> <a href="Netcgi_fcgi_10.html">..</a> <code class="code">end</code></pre>Low-level FastCGI Wire Protocol<br>
<hr width="100%">
<br>
This code is copyright 2003 Eric Stokes, and may be used under
either, the GNU GPL, or the same license as ocamlnet<br>
<br>
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<br>
<pre><span class="keyword">exception</span> <a name="EXCEPTIONFCGI_error"></a>FCGI_error <span class="keyword">of</span> <code class="type">string * exn</code></pre>
<pre><span class="keyword">val</span> <a name="VALmax_rec_size"></a>max_rec_size : <code class="type">int</code></pre><div class="info">
The maximum record size for stdout, and stderr. If you try to send
a record larger than this value to fcgi_write_stdout, or
fcgi_write_stderr you will get an exception<br>
</div>
<br><code><span class="keyword">type</span> <a name="TYPEfcgiHeader"></a><code class="type"></code>fcgiHeader = {</code><table class="typetable">
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code>version : <code class="type">int</code>;</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code>rtype : <code class="type">int</code>;</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code>requestid : <code class="type">int</code>;</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code>contentlen : <code class="type">int</code>;</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code>padlen : <code class="type">int</code>;</code></td>
</tr></table>
}
<div class="info">
protocal header<br>
</div>
<br><code><span class="keyword">type</span> <a name="TYPEfcgiBeginRequestBody"></a><code class="type"></code>fcgiBeginRequestBody = {</code><table class="typetable">
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code>role : <code class="type">int</code>;</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code>flags : <code class="type">int</code>;</code></td>
</tr></table>
}
<div class="info">
begin request<br>
</div>
<br><code><span class="keyword">type</span> <a name="TYPEfcgiEndRequestBody"></a><code class="type"></code>fcgiEndRequestBody = {</code><table class="typetable">
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code>astatus : <code class="type">int</code>;</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code>pstatus : <code class="type">int</code>;</code></td>
</tr></table>
}
<div class="info">
end request<br>
</div>
<br><code><span class="keyword">type</span> <a name="TYPEfcgiRequest"></a><code class="type"></code>fcgiRequest = {</code><table class="typetable">
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code>id : <code class="type">int</code>;</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code>app_type : <code class="type">int</code>;</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code>params : <code class="type">(string * string) list</code>;</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code>stdin : <code class="type">string</code>;</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code>data : <code class="type">string</code>;</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code> </code></td>
<td align="left" valign="top" >
<code>con : <code class="type">Unix.file_descr</code>;</code></td>
</tr></table>
}
<div class="info">
fcgi params will return an asociation list fcgi stdin will return
a string a full request record, what you get when you call
fcgi_accept<br>
</div>
<pre><span class="keyword">val</span> <a name="VALfcgi_accept"></a>fcgi_accept : <code class="type">unit -> <a href="Netcgi_fcgi_10.html#TYPEfcgiRequest">fcgiRequest</a></code></pre><div class="info">
accept a fastcgi connection<br>
</div>
<pre><span class="keyword">val</span> <a name="VALfcgi_destroy"></a>fcgi_destroy : <code class="type"><a href="Netcgi_fcgi_10.html#TYPEfcgiRequest">fcgiRequest</a> -> unit</code></pre><div class="info">
tear down a connection after finishing with it<br>
</div>
<pre><span class="keyword">val</span> <a name="VALfcgi_write_stdout"></a>fcgi_write_stdout : <code class="type"><a href="Netcgi_fcgi_10.html#TYPEfcgiRequest">fcgiRequest</a> -> string -> unit</code></pre><div class="info">
write to fcgi stdout<br>
</div>
<pre><span class="keyword">val</span> <a name="VALfcgi_write_stderr"></a>fcgi_write_stderr : <code class="type"><a href="Netcgi_fcgi_10.html#TYPEfcgiRequest">fcgiRequest</a> -> string -> unit</code></pre><div class="info">
write to fcgi stderr<br>
</div>
<pre><span class="keyword">val</span> <a name="VALfcgi_write_end_request"></a>fcgi_write_end_request : <code class="type"><a href="Netcgi_fcgi_10.html#TYPEfcgiRequest">fcgiRequest</a> -> <a href="Netcgi_fcgi_10.html#TYPEfcgiEndRequestBody">fcgiEndRequestBody</a> -> unit</code></pre><div class="info">
write an end request record<br>
</div>
</body></html>
|