mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Added a link to socket_create instead of repeating the arrays & added a description for the fd array parameter.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@239124 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
dd1825e90b
commit
081b2d04b9
1 changed files with 10 additions and 133 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue