cvs: phpdoc /en/reference/sockets/functions socket-recvfrom.xml

From: Date: Mon, 25 Jun 2007 19:40:11 +0000
Subject: cvs: phpdoc /en/reference/sockets/functions socket-recvfrom.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969376868@lists.php.net to get a copy of this message
gwynne Mon Jun 25 19:40:11 2007 UTC Modified files: /phpdoc/en/reference/sockets/functions socket-recvfrom.xml Log: Fix several entity and tag errors, fix WS, fix grammar and spelling.

http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/sockets/functions/socket-recvfrom.xml?r1=1.11&r2=1.12&diff_format=u Index: phpdoc/en/reference/sockets/functions/socket-recvfrom.xml diff -u phpdoc/en/reference/sockets/functions/socket-recvfrom.xml:1.11 phpdoc/en/reference/sockets/functions/socket-recvfrom.xml:1.12 --- phpdoc/en/reference/sockets/functions/socket-recvfrom.xml:1.11 Mon Jun 25 17:15:51 2007 +++ phpdoc/en/reference/sockets/functions/socket-recvfrom.xml Mon Jun 25 19:40:11 2007 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.11 $ --> +<!-- $Revision: 1.12 $ --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-recvfrom"> <refnamediv> <refname>socket_recvfrom</refname> @@ -18,20 +18,24 @@ <methodparam choice="opt"><type>int</type><parameter role="reference">port</parameter></methodparam> </methodsynopsis> <para> - The <function>socket_recvfrom</function> function receives <parameter>len</paramater> - bytes of data in <parameter>buf</parameter> from <parameter>name</parameter> on port - <parameter>port</parameter> (if socket is not of AF_UNIX type) using - <parameter>socket</parameter>. <function>socket_recvfrom</function> can be used to - gather data from either a connected or an unconnected socket. Additionally, one or more - flags can be specified to modify the behaviour of the function. - </para> - <para> - The <parameter>name</parameter> and <parameter>port</parameter> must be passed as a - reference. If the socket is not connection-oriented, <parameter>name</parameter> will - be set to the internet protocol address of the remote host or the path to the UNIX - socket. If the socket is connection-oriented, <parameter>name</parameter> is &null. - Additionnally, the <parameter>port</parameter> will contain the port of the - remote host in the case of a not connection-oriented AF_INET or AF_INET6 socket. + The <function>socket_recvfrom</function> function receives + <parameter>len</parameter> bytes of data in <parameter>buf</parameter> from + <parameter>name</parameter> on port <parameter>port</parameter> (if the + socket is not of type <constant>AF_UNIX</constant>) using + <parameter>socket</parameter>. <function>socket_recvfrom</function> can be + used to gather data from both connected and unconnected sockets. + Additionally, one or more flags can be specified to modify the behaviour of + the function. + </para> + <para> + The <parameter>name</parameter> and <parameter>port</parameter> must be + passed by reference. If the socket is not connection-oriented, + <parameter>name</parameter> will be set to the internet protocol address of + the remote host or the path to the UNIX socket. If the socket is + connection-oriented, <parameter>name</parameter> is &null;. Additionally, + the <parameter>port</parameter> will contain the port of the remote host in + the case of an unconnected <constant>AF_INET</constant> or + <constant>AF_INET6</constant> socket. </para> </refsect1> @@ -43,7 +47,8 @@ <term><parameter>socket</parameter></term> <listitem> <para> - The <parameter>socket</parameter> must be a socket resource previously created with socket_create(). + The <parameter>socket</parameter> must be a socket resource previously + created by socket_create(). </para> </listitem> </varlistentry> @@ -52,7 +57,8 @@ <term><parameter>buf</parameter></term> <listitem> <para> - The data received will be fetched to the variable specified with <parameter>buf</parameter>. + The data received will be fetched to the variable specified with + <parameter>buf</parameter>. </para> </listitem> </varlistentry> @@ -70,9 +76,9 @@ <term><parameter>flags</parameter></term> <listitem> <para> - The following table contains the different flags that can be set using the - <parameter>flags</parameter> parameter. Use the OR logic operator to use more - than one flag. + The following table contains the different flags that can be set using + the <parameter>flags</parameter> parameter. Use the OR logic operator + (<literal>|</literal>) to use more than one flag. </para> <table> @@ -88,29 +94,29 @@ <row> <entry>MSG_OOB</entry> <entry> - Receive out-of-band data. + Receive out-of-band data. </entry> </row> <row> <entry>MSG_PEEK</entry> <entry> - Receive data from the beginning of the receive queue without removing - it from the queue. + Receive data from the beginning of the receive queue without + removing it from the queue. </entry> </row> <row> <entry>MSG_WAITALL</entry> <entry> - Block until at least <parameter>len</parameter> are received. However, - if a signal is caught or the remote host disconnects, the function - may return less data. + Block until at least <parameter>len</parameter> are received. + However, if a signal is caught or the remote host disconnects, the + function may return less data. </entry> </row> <row> <entry>MSG_DONTWAIT</entry> <entry> - With this flag set, the function returns even if it would normally have - blocked. + With this flag set, the function returns even if it would normally + have blocked. </entry> </row> </tbody> @@ -123,9 +129,10 @@ <term><parameter>name</parameter></term> <listitem> <para> - If the socket is of AF_UNIX type, <parameter>name</parameter> is the path to the - file. Else, in the case of non-connection oriented socket <parameter>name</parameter> - is the IP address of the remote host and &null if the socket is connection oriented. + If the socket is of the type <constant>AF_UNIX</constant> type, + <parameter>name</parameter> is the path to the file. Else, for + unconnected sockets, <parameter>name</parameter> is the IP address of, + the remote host, or &null; if the socket is connection-oriented. </para> </listitem> </varlistentry> @@ -134,9 +141,10 @@ <term><parameter>port</parameter></term> <listitem> <para> - This argument only applies to AF_INET and AF_INET6 sockets and specifies the - remote port from which the data is received. If the socket is connection - oriented, <parameter>port</parameter> will be &null. + This argument only applies to <constant>AF_INET</constant> and + <constant>AF_INET6</constant> sockets, and specifies the remote port + from which the data is received. If the socket is connection-oriented, + <parameter>port</parameter> will be &null;. </para> </listitem> </varlistentry> @@ -148,11 +156,11 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - <function>socket_recvfrom</function> returns the number of bytes received + <function>socket_recvfrom</function> returns the number of bytes received, or -1 if there was an error. The actual error code can be retrieved by - calling <function>socket_last_error</function>. This error code may be passed - to <function>socket_strerror</function> to get a textual explanation of the - error. + calling <function>socket_last_error</function>. This error code may be + passed to <function>socket_strerror</function> to get a textual explanation + of the error. </para> </refsect1> @@ -177,9 +185,9 @@ ]]> </programlisting> <para> - This will example will initiate a TCP connection to 127.0.0.1 on port 1223 - and print at most 12 characters received from the remote host or block - until no data is received. + This example will initiate a TCP connection to 127.0.0.1 on port 1223 and + print at most 12 characters received from the remote host or block until + data is received. </para> </example> </para>
« previous php.doc (#969376868) next »