mfischer                Wed Jan  2 21:43:12 2002 EDT

  Modified files:              
    /phpdoc/en/functions        ftp.xml 
  Log:
  - Go along with latest CVS changes.
  
  
Index: phpdoc/en/functions/ftp.xml
diff -u phpdoc/en/functions/ftp.xml:1.31 phpdoc/en/functions/ftp.xml:1.32
--- phpdoc/en/functions/ftp.xml:1.31    Tue Jan  1 20:07:03 2002
+++ phpdoc/en/functions/ftp.xml Wed Jan  2 21:43:12 2002
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.31 $ -->
+<!-- $Revision: 1.32 $ -->
  <reference id="ref.ftp">
   <title>FTP functions</title>
   <titleabbrev>FTP</titleabbrev>
@@ -73,8 +73,8 @@
      <funcprototype>
       <funcdef>resource <function>ftp_connect</function></funcdef>
       <paramdef>string <parameter>host</parameter></paramdef>
-      <paramdef>int <parameter><optional>port</optional>
-       </parameter></paramdef>
+      <paramdef>int <parameter><optional>port</optional></paramdef></paramdef>
+      <paramdef>int <parameter><optional>timeout</optional></parameter></paramdef>
      </funcprototype>
     </funcsynopsis>
     <para>
@@ -86,6 +86,18 @@
      parameter specifies an alternate port to connect to.  If it is
      omitted or zero, then the default FTP port, 21, will be used.
     </para>
+    <para>
+     The <parameter>timeout</parameter> parameter specifies the timeout for all
+     subsequent network operations. If ommited, the default value is 90
+     seconds. The timeout can be changed and queried anytime with
+     <function>ftp_set_option</function> and
+     <function>ftp_get_option</function>.
+     <note>
+      <para>
+       This is parameter is only available in CVS.
+      </para>
+     </note>
+    </para>
    </refsect1>
   </refentry>
 
@@ -616,6 +628,123 @@
     </funcsynopsis>
     <para>
      &warn.undocumented.func;
+    </para>
+   </refsect1>
+  </refentry>
+
+  <refentry id='function.ftp-set-option'>
+   <refnamediv>
+    <refname>ftp_set_option</refname>
+    <refpurpose>
+     Set miscellaneous runtime FTP options.
+    </refpurpose>
+   </refnamediv>
+   <refsect1>
+    <title>Description</title>
+    <funcsynopsis>
+     <funcprototype>
+      <funcdef>bool <function>ftp_set_option</function></funcdef>
+      <paramdef>resource <parameter>stream</parameter></paramdef>
+      <paramdef>int <parameter>option</parameter></paramdef>
+      <paramdef>mixed <parameter>value</parameter></paramdef>
+     </funcprototype>
+    </funcsynopsis>
+    <note>
+     <para>
+      This function is only available in CVS.
+     </para>
+    </note>
+    <para>
+     Returns &true; if the option could be set; &false; if not. A warning
+     message will be thrown if the <parameter>option</parameter> is not
+     supported or the passed <parameter>value</parameter> doesn't match the
+     expected value for the given <parameter>option</parameter>.
+    </para>
+    <para>
+     This function controls various runtime options for the specified FTP
+     stream. The <parameter>value</parameter> parameter depends on which
+     <parameter>option</parameter> parameter is choosen to be altered.
+     Currently, the following options are supported:
+     <table>
+      <title>Supported runtime FTP options</title>
+      <tgroup cols="2">
+       <tbody>
+        <row>
+         <entry><member>FTP_TIMEOUT_SEC</member></entry>
+         <entry>Changes the timeout in seconds used for all network related
+         functions. Parameter <parameter>value</parameter> has be to of type
+         int and must be greater than 0. The default timeout is 90
+         seconds.</entry>
+        </row>
+       </tbody>
+      </tgroup>
+     </table>
+    </para>
+    <para>
+     <example>
+      <title><function>ftp_set_option</function> example</title>
+      <programlisting role="php">
+<![CDATA[
+// Set the network timeout down to 10 seconds
+ftp_set_option($conn_id, FTP_TIMEOUT_SEC, 10);
+]]>
+      </programlistuing>
+    </para>
+   </refsect1>
+  </refentry>
+
+  <refentry id='function.ftp-get-option'>
+   <refnamediv>
+    <refname>ftp_get_option</refname>
+    <refpurpose>
+     Retrieves various runtime behaviours of the current FTP stream.
+    </refpurpose>
+   </refnamediv>
+   <refsect1>
+    <title>Description</title>
+    <funcsynopsis>
+     <funcprototype>
+      <funcdef>bool <function>ftp_get_option</function></funcdef>
+      <paramdef>resource <parameter>stream</parameter></paramdef>
+      <paramdef>int <parameter>option</parameter></paramdef>
+     </funcprototype>
+    </funcsynopsis>
+    <note>
+     <para>
+      This function is only available in CVS.
+     </para>
+    </note>
+    <para>
+     Returns the value on success or &false; if the given
+     <parameter>option</parameter> is not supposed. In the latter case a
+     warning message is also thrown.
+    </para>
+    <para>
+     This function returns the <parameter>value</parameter> for the requested
+     <parameter>option</parameter> from the specified <parameter>FTP
+     stream</parameter>.  Currently, the following options are supported:
+     <table>
+      <title>Supported runtime FTP options</title>
+      <tgroup cols="2">
+       <tbody>
+        <row>
+         <entry><member>FTP_TIMEOUT_SEC</member></entry>
+         <entry>Returns the current timeout used for network related
+         operations.</entry>
+        </row>
+       </tbody>
+      </tgroup>
+     </table>
+    </para>
+    <para>
+     <example>
+      <title><function>ftp_get_option</function> example</title>
+      <programlisting role="php">
+<![CDATA[
+// Get the timeout of the given FTP stream
+$timeout = ftp_get_option($conn_id, FTP_TIMEOUT_SEC);
+]]>
+      </programlistuing>
     </para>
    </refsect1>
   </refentry>


Reply via email to