Branch: Tag:

2003-10-05

2003-10-05 19:34:20 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Added documentation for the PROP_* used by Stdio.File()->pipe().

Rev: lib/modules/Stdio.pmod/module.pmod:1.182

619:   <dt class='head--type'><span class='homogen--type'>Method</span>   <span class='homogen--name'><b>pipe</b></span>   </dt> - <dd><p><code><code class='object unresolved'>File</code> <b><span class='method'>pipe</span>(</b><code class='datatype'>void</code>|<code class='datatype'>int</code> <code class='argument'>how</code><b>)</b></code></p></dd> + <dd><p><code><code class='object unresolved'>File</code> <b><span class='method'>pipe</span>(</b><code class='datatype'>void</code>|<code class='datatype'>int</code> <code class='argument'>required_properties</code><b>)</b></code></p></dd>      <dt class='head--doc'>Description</dt> - <dd class='body--doc'><p>This function creates a bi-directional pipe between the object it -  was called in and an object that is returned. The two ends of the -  pipe are indistinguishable. If the File object this function is -  called in was open to begin with, it will be closed before the pipe -  is created.</p> - </dd><dt class='head--fixme'>FIXME</dt> - <dd class='body--fixme'><p>Document the <code class='expr'>PROP_</code> properties.</p> + <dd class='body--doc'><p>This function creates a pipe between the object it was called in +  and an object that is returned.</p>   </dd> -  + <dt class='head--doc'><span id='p-void|int'></span>Parameter <code class='parameter'>void|int</code></dt> + <dd></dd><dd class='body--doc'><p>Binary or (<code>predef::`|()</code>) of required <code class='expr'>PROP_</code> properties.</p> + <table class='box'><tr><td><code><code class='key'>PROP_IPC</code></code></td><td><p>The resulting pipe may be used for inter process communication.</p> + </td></tr> + <tr><td><code><code class='key'>PROP_NONBLOCK</code></code></td><td><p>The resulting pipe supports nonblocking I/O.</p> + </td></tr> + <tr><td><code><code class='key'>PROP_SHUTDOWN</code></code></td><td><p>The resulting pipe supports shutting down transmission in either +  direction (see <code>close()</code>).</p> + </td></tr> + <tr><td><code><code class='key'>PROP_BUFFERED</code></code></td><td><p>The resulting pipe is buffered (usually 4KB).</p> + </td></tr> + <tr><td><code><code class='key'>PROP_BIDIRECTIONAL</code></code></td><td><p>The resulting pipe is bi-directional.</p> + </td></tr> + <tr><td><code><code class='key'>PROP_REVERSE</code></code></td><td><p>The resulting pipe supports communication "backwards" (but +  not necessarily "forwards", see <code>PROP_BIDIRECTIONAL</code>).</p> + </td></tr> + </table><p>The default is <code class='expr'>PROP_NONBLOCK|PROP_BIDIRECTIONAL</code>.</p> + <p> If <code>PROP_BIDIRECTIONAL</code> isn't specified, the read-end is this +  object, and the write-end is the returned object (unless +  <code>PROP_REVERSE</code> has been specified, in which case it is the other +  way around).</p> + <p> The two ends of a bi-directional pipe are indistinguishable.</p> + <p> If the File object this function is called in was open to begin with, +  it will be closed before the pipe is created.</p> + </dd> + <dt class='head--doc'>Note</dt> + <dd class='body--doc'><p>Calling this function with an argument of <tt>0</tt> is not the +  same as calling it with no arguments.</p> + </dd>   <dt class='head--doc'>See also</dt> - <dd class='body--doc'><p><code>Process.create_process()</code></p> + <dd class='body--doc'><p><code>Process.create_process()</code>, <code>PROP_IPC</code>, <code>PROP_NONBLOCK</code>, +  <code>PROP_SHUTDOWN</code>, <code>PROP_BUFFERED</code>, <code>PROP_REVERSE</code>, +  <code>PROP_BIDIRECTIONAL</code></p>   </dd></dl>