nicobn Tue Jul 3 19:38:22 2007 UTC
Modified files: /phpdoc/en/reference/sockets/functions socket-create-pair.xml Log: Added a link to socket_create instead of repeating the arrays & added a description for the fd array parameter. http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/sockets/functions/socket-create-pair.xml?r1=1.17&r2=1.18&diff_format=u Index: phpdoc/en/reference/sockets/functions/socket-create-pair.xml diff -u phpdoc/en/reference/sockets/functions/socket-create-pair.xml:1.17 phpdoc/en/reference/sockets/functions/socket-create-pair.xml:1.18 --- phpdoc/en/reference/sockets/functions/socket-create-pair.xml:1.17 Wed Jun 20 22:25:25 2007 +++ phpdoc/en/reference/sockets/functions/socket-create-pair.xml Tue Jul 3 19:38:22 2007 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.17 $ --> +<!-- $Revision: 1.18 $ --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-create-pair"> <refnamediv> <refname>socket_create_pair</refname> @@ -31,43 +31,9 @@ <listitem> <para> The <parameter>domain</parameter> parameter specifies the protocol - family to be used by the socket. + family to be used by the socket. See <function>socket_create</function> + for the full list. </para> - <table> - <title>Available address/protocol families</title> - <tgroup cols="2"> - <thead> - <row> - <entry>Domain</entry> - <entry>Description</entry> - </row> - </thead> - <tbody> - <row> - <entry>AF_INET</entry> - <entry> - IPv4 Internet based protocols. TCP and UDP are common protocols of - this protocol family. Supported only in windows. - </entry> - </row> - <row> - <entry>AF_INET6</entry> - <entry> - IPv6 Internet based protocols. TCP and UDP are common protocols of - this protocol family. Support added in PHP 5.0.0. - Supported only in windows. - </entry> - </row> - <row> - <entry>AF_UNIX</entry> - <entry> - Local communication protocol family. High efficiency and low - overhead make it a great form of IPC (Interprocess Communication). - </entry> - </row> - </tbody> - </tgroup> - </table> </listitem> </varlistentry> <varlistentry> @@ -75,60 +41,9 @@ <listitem> <para> The <parameter>type</parameter> parameter selects the type of communication - to be used by the socket. + to be used by the socket. See <function>socket_create</function> for the + full list. </para> - <table> - <title>Available socket types</title> - <tgroup cols="2"> - <thead> - <row> - <entry>Type</entry> - <entry>Description</entry> - </row> - </thead> - <tbody> - <row> - <entry>SOCK_STREAM</entry> - <entry> - Provides sequenced, reliable, full-duplex, connection-based byte streams. - An out-of-band data transmission mechanism may be supported. - The TCP protocol is based on this socket type. - </entry> - </row> - <row> - <entry>SOCK_DGRAM</entry> - <entry> - Supports datagrams (connectionless, unreliable messages of a fixed maximum length). - The UDP protocol is based on this socket type. - </entry> - </row> - <row> - <entry>SOCK_SEQPACKET</entry> - <entry> - Provides a sequenced, reliable, two-way connection-based data transmission path for - datagrams of fixed maximum length; a consumer is required to read an - entire packet with each read call. - </entry> - </row> - <row> - <entry>SOCK_RAW</entry> - <entry> - Provides raw network protocol access. This special type of socket - can be used to manually construct any type of protocol. A common use - for this socket type is to perform ICMP requests (like ping, - traceroute, etc). - </entry> - </row> - <row> - <entry>SOCK_RDM</entry> - <entry> - Provides a reliable datagram layer that does not guarantee ordering. - This is most likely not implemented on your operating system. - </entry> - </row> - </tbody> - </tgroup> - </table> </listitem> </varlistentry> <varlistentry> @@ -143,55 +58,17 @@ <constant>SOL_TCP</constant>, and <constant>SOL_UDP</constant> can also be used. </para> - <table> - <title>Common protocols</title> - <tgroup cols="2"> - <thead> - <row> - <entry>Name</entry> - <entry>Description</entry> - </row> - </thead> - <tbody> - <row> - <entry>icmp</entry> - <entry> - The Internet Control Message Protocol is used primarily by gateways - and hosts to report errors in datagram communication. The "ping" - command (present in most modern operating systems) is an example - application of ICMP. - </entry> - </row> - <row> - <entry>udp</entry> - <entry> - The User Datagram Protocol is a connectionless, unreliable, - protocol with fixed record lengths. Due to these aspects, UDP - requires a minimum amount of protocol overhead. - </entry> - </row> - <row> - <entry>tcp</entry> - <entry> - The Transmission Control Protocol is a reliable, connection based, - stream oriented, full duplex protocol. TCP guarantees that all data packets - will be received in the order in which they were sent. If any packet is somehow - lost during communication, TCP will automatically retransmit the packet until - the destination host acknowledges that packet. For reliability and performance - reasons, the TCP implementation itself decides the appropriate octet boundaries - of the underlying datagram communication layer. Therefore, TCP applications must - allow for the possibility of partial record transmission. - </entry> - </row> - </tbody> - </tgroup> - </table> + <para> + See <function>socket_create</function> for the full list of supported + protocols. + </para> </listitem> </varlistentry> <varlistentry> <term><parameter>fd</parameter></term> <listitem> <para> + Reference to an array in which the two socket resources will be inserted. </para> </listitem> </varlistentry>