com doc/fr: Apply commit 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9: language-snippets.ent reference/sockets/functions/socket-accept.xml
reference/sockets/functions/socket-bind.xml reference/sockets/functions/socket-clear-error.xml reference/sockets/functions/socket-close.xml
reference/sockets/functions/socket-cmsg-space.xml reference/sockets/functions/socket-connect.xml reference/sockets/functions/socket-create-listen.xml
reference/sockets/functio
| From: | George Peter Banyard | Date: | Tue, 12 Jan 2021 05:58:45 +0000 |
| Subject: | com doc/fr: Apply commit 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9: language-snippets.ent reference/sockets/functions/socket-accept.xml reference/sockets/functions/socket-bind.xml reference/sockets/functions/socket-clear-error.xml reference/sockets/functions/socket-close.xml reference/sockets/functions/socket-cmsg-space.xml reference/sockets/functions/socket-connect.xml reference/sockets/functions/socket-create-listen.xml reference/sockets/functio |
||
| Groups: | php.doc.fr | ||
| Request: | Send a blank email to doc-fr+get-13494@lists.php.net to get a copy of this message | ||
Commit: b7784c08a3ca9138c9e6ad81e3ce4ec7a19666ea
Author: George Peter Banyard <girgias@php.net> Tue, 12 Jan 2021 05:58:45 +0000
Parents: 4ad86e5e0be3b28f6c351c830129a4e273e52ae7
Branches: master
Link: http://git.php.net/?p=doc/fr.git;a=commitdiff;h=b7784c08a3ca9138c9e6ad81e3ce4ec7a19666ea
Log:
Apply commit 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9
Generate sockets methodsynopses based on stubs
Changed paths:
M language-snippets.ent
M reference/sockets/functions/socket-accept.xml
M reference/sockets/functions/socket-bind.xml
M reference/sockets/functions/socket-clear-error.xml
M reference/sockets/functions/socket-close.xml
M reference/sockets/functions/socket-cmsg-space.xml
M reference/sockets/functions/socket-connect.xml
M reference/sockets/functions/socket-create-listen.xml
M reference/sockets/functions/socket-create-pair.xml
M reference/sockets/functions/socket-create.xml
M reference/sockets/functions/socket-get-option.xml
M reference/sockets/functions/socket-getpeername.xml
M reference/sockets/functions/socket-getsockname.xml
M reference/sockets/functions/socket-import-stream.xml
M reference/sockets/functions/socket-last-error.xml
M reference/sockets/functions/socket-listen.xml
M reference/sockets/functions/socket-read.xml
M reference/sockets/functions/socket-recv.xml
M reference/sockets/functions/socket-recvfrom.xml
M reference/sockets/functions/socket-recvmsg.xml
M reference/sockets/functions/socket-select.xml
M reference/sockets/functions/socket-send.xml
M reference/sockets/functions/socket-sendmsg.xml
M reference/sockets/functions/socket-sendto.xml
M reference/sockets/functions/socket-set-block.xml
M reference/sockets/functions/socket-set-nonblock.xml
M reference/sockets/functions/socket-set-option.xml
M reference/sockets/functions/socket-shutdown.xml
M reference/sockets/functions/socket-strerror.xml
M reference/sockets/functions/socket-write.xml
M reference/sockets/setup.xml
diff --git a/language-snippets.ent b/language-snippets.ent index 61d9ebaf88..a528f00fbe 100644 --- a/language-snippets.ent +++ b/language-snippets.ent @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: c47cd3156640f6fddbb20ed1c8b5c86a706f9b0e Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <!-- Relecture des Notes, Précautions, Avertissements, Astuces, Divers et Retour le 2018-12-29 par girgias --> @@ -1169,6 +1169,24 @@ de mot de passe</link> représentant l'algorithme à utiliser lors du hachag <!ENTITY password.parameter.password 'Le mot de passe utilisateur.'> +<!-- socket entities --> + +<!ENTITY sockets.changelog.socket-param '<row xmlns="http://docbook.org/ns/docbook"> + <entry>8.0.0</entry> + <entry> + <parameter>socket</parameter> est désormais une instance de <classname>Socket</classname> ; + auparavant, c'était une <type>resource</type>. + </entry> +</row>'> + +<!ENTITY sockets.changelog.address-param '<row xmlns="http://docbook.org/ns/docbook"> + <entry>8.0.0</entry> + <entry> + <parameter>address</parameter> est désormais une instance de <classname>AddressInfo</classname> ; + auparavant, c'était une <type>resource</type>. + </entry> +</row>'> + <!-- geaman notes --> <!ENTITY gearman.parameter.host 'Le nom d'hôte du serveur de travaux.'> diff --git a/reference/sockets/functions/socket-accept.xml b/reference/sockets/functions/socket-accept.xml index ebb9a43560..504e319c32 100755 --- a/reference/sockets/functions/socket-accept.xml +++ b/reference/sockets/functions/socket-accept.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: e41806c30bf6975e452c0d4ce35ab0984c2fa68c Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-accept"> +<refentry xml:id="function.socket-accept" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_accept</refname> <refpurpose>Accepte une connexion sur un socket</refpurpose> @@ -12,8 +11,8 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <type>resource</type><methodname>socket_accept</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <type class="union"><type>Socket</type><type>false</type></type><methodname>socket_accept</methodname> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> </methodsynopsis> <para> Une fois que le socket <parameter>socket</parameter> a été créé avec la @@ -21,8 +20,8 @@ <function>socket_bind</function>, et mis en attente de connexion avec la fonction <function>socket_listen</function>, <function>socket_accept</function> va accepter les connexions sur ce - socket. Une fois qu'une connexion est faite, une nouvelle ressource de - socket est retournée. Elle peut être utilisée pour les communications. + socket. Une fois qu'une connexion est faite, une nouvelle instance de + <classname>Socket</classname> est retournée. Elle peut être utilisée pour les communications. S'il y a plusieurs connexions en attente, la première sera utilisée. S'il n'y a pas de connexion en attente, <function>socket_accept</function> se bloquera jusqu'à ce qu'une connexion se présente. Si @@ -31,7 +30,7 @@ <function>socket_set_nonblock</function>, &false; sera retourné. </para> <para> - La ressource de socket retournée par + L'instance de <classname>Socket</classname> retournée par <function>socket_accept</function> ne doit pas être utilisée pour accepter de nouvelles connexions. Le socket original <parameter>socket</parameter>, qui est en attente, reste ouvert @@ -47,8 +46,7 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide, créée par - la fonction <function>socket_create</function>. + Une instance de <classname>Socket</classname> créée par <function>socket_create</function>. </para> </listitem> </varlistentry> @@ -59,7 +57,7 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - Retourne une nouvelle ressource de socket en cas de succès ou &false; en cas + Retourne une nouvelle instance de <classname>Socket</classname> en cas de succès ou &false; en cas d'erreur. Le code d'erreur généré peut être obtenu en appelant la fonction <function>socket_last_error</function>. Ce code d'erreur peut être passé à la fonction <function>socket_strerror</function> pour obtenir un message @@ -67,6 +65,29 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>8.0.0</entry> + <entry> + En cas de succès, cette fonction retourne désormais une instance de <classname>Socket</classname> ; + auparavant, une <type>resource</type> était retournée. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> @@ -80,7 +101,6 @@ </para> </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-bind.xml b/reference/sockets/functions/socket-bind.xml index 2209ecffb5..9ca50743f5 100755 --- a/reference/sockets/functions/socket-bind.xml +++ b/reference/sockets/functions/socket-bind.xml @@ -1,8 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 8e291b4d3798b4f54060b0b6cfb6500762a8b97a Maintainer: jpauli Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: jpauli Status: ready --> <!-- Reviewed: yes --> - <refentry xml:id="function.socket-bind" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_bind</refname> @@ -13,7 +12,7 @@ &reftitle.description; <methodsynopsis> <type>bool</type><methodname>socket_bind</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> <methodparam><type>string</type><parameter>address</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>port</parameter><initializer>0</initializer></methodparam> </methodsynopsis> @@ -33,7 +32,7 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide créée par la fonction <function>socket_create</function>. + Une instance de <classname>Socket</classname> créée par <function>socket_create</function>. </para> </listitem> </varlistentry> @@ -76,6 +75,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="examples"> &reftitle.examples; <para> @@ -143,7 +159,6 @@ socket_close($sock); </para> </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-clear-error.xml b/reference/sockets/functions/socket-clear-error.xml index ba360a64a7..2785357267 100755 --- a/reference/sockets/functions/socket-clear-error.xml +++ b/reference/sockets/functions/socket-clear-error.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-clear-error"> +<refentry xml:id="function.socket-clear-error" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_clear_error</refname> <refpurpose>Efface toutes les erreurs précédemment générées par un socket</refpurpose> @@ -13,7 +12,7 @@ &reftitle.description; <methodsynopsis> <type>void</type><methodname>socket_clear_error</methodname> - <methodparam choice="opt"><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam choice="opt"><type class="union"><type>Socket</type><type>null</type></type><parameter>socket</parameter><initializer>&null;</initializer></methodparam> </methodsynopsis> <para> Efface tous les codes d'erreur qui ont été enregistrés pour le socket @@ -35,8 +34,7 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide, créée par la fonction - <function>socket_create</function>. + Une instance de <classname>Socket</classname> créée par <function>socket_create</function>. </para> </listitem> </varlistentry> @@ -51,6 +49,29 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + <row> + <entry>8.0.0</entry> + <entry> + <parameter>socket</parameter> est désormais nullable. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> @@ -62,7 +83,6 @@ </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-close.xml b/reference/sockets/functions/socket-close.xml index 018f6bca91..6cea2402fc 100755 --- a/reference/sockets/functions/socket-close.xml +++ b/reference/sockets/functions/socket-close.xml @@ -1,25 +1,22 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-close"> +<refentry xml:id="function.socket-close" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_close</refname> - <refpurpose>Ferme un socket</refpurpose> + <refpurpose>Ferme une instance de <classname>Socket</classname></refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>void</type><methodname>socket_close</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> </methodsynopsis> <para> - <function>socket_close</function> ferme le socket - <parameter>socket</parameter> et détruit toutes les ressources qui y sont - liées. Cette fonction est spécifique aux sockets et ne peut être utilisée - avec les autres types de ressource. + <function>socket_close</function> ferme l'instance <classname>Socket</classname> + fournis par <parameter>socket</parameter>. </para> </refsect1> @@ -31,9 +28,8 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide, créée par la fonction - <function>socket_create</function> ou la fonction - <function>socket_accept</function>. + Une instance de <classname>Socket</classname> créée par <function>socket_create</function> + ou <function>socket_accept</function>. </para> </listitem> </varlistentry> @@ -48,6 +44,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> @@ -61,7 +74,6 @@ </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-cmsg-space.xml b/reference/sockets/functions/socket-cmsg-space.xml index 6b211b528a..d9504bc0fc 100644 --- a/reference/sockets/functions/socket-cmsg-space.xml +++ b/reference/sockets/functions/socket-cmsg-space.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: fa994a739c769e155f6b6848f66f1f9a24ec9eb0 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-cmsg-space"> +<refentry xml:id="function.socket-cmsg-space" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_cmsg_space</refname> <refpurpose>Calcule la taille du buffer</refpurpose> @@ -11,10 +10,10 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <type>int</type><methodname>socket_cmsg_space</methodname> + <type class="union"><type>int</type><type>null</type></type><methodname>socket_cmsg_space</methodname> <methodparam><type>int</type><parameter>level</parameter></methodparam> <methodparam><type>int</type><parameter>type</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>n</parameter><initializer>0</initializer></methodparam> + <methodparam choice="opt"><type>int</type><parameter>num</parameter><initializer>0</initializer></methodparam> </methodsynopsis> <para> Calcule la taille du buffer qui doit être allouée pour recevoir les @@ -62,7 +61,6 @@ </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-connect.xml b/reference/sockets/functions/socket-connect.xml index 8479a0bc51..0d860a5185 100755 --- a/reference/sockets/functions/socket-connect.xml +++ b/reference/sockets/functions/socket-connect.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-connect"> +<refentry xml:id="function.socket-connect" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_connect</refname> <refpurpose>Crée une connexion sur un socket</refpurpose> @@ -13,14 +12,14 @@ &reftitle.description; <methodsynopsis> <type>bool</type><methodname>socket_connect</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> <methodparam><type>string</type><parameter>address</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>port</parameter><initializer>0</initializer></methodparam> + <methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>port</parameter><initializer>&null;</initializer></methodparam> </methodsynopsis> <para> - Crée une nouvelle connexion en utilisant la ressource socket - <parameter>socket</parameter>, qui doit être une ressource de - socket valide, créée par la fonction <function>socket_create</function>. + Crée une nouvelle connexion en utilisant l'instance <classname>Socket</classname> + <parameter>socket</parameter>, qui doit être une instance de + <classname>Socket</classname> créée par <function>socket_create</function>. </para> </refsect1> @@ -81,6 +80,29 @@ </note> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + <row> + <entry>8.0.0</entry> + <entry> + <parameter>port</parameter> est désormais nullable. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> @@ -95,7 +117,6 @@ </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-create-listen.xml b/reference/sockets/functions/socket-create-listen.xml index dd71a94cb7..fd077d2c32 100755 --- a/reference/sockets/functions/socket-create-listen.xml +++ b/reference/sockets/functions/socket-create-listen.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: e41806c30bf6975e452c0d4ce35ab0984c2fa68c Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-create-listen"> +<refentry xml:id="function.socket-create-listen" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_create_listen</refname> <refpurpose>Ouvre un socket sur un port pour accepter les connexions</refpurpose> @@ -12,13 +11,13 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <type>resource</type><methodname>socket_create_listen</methodname> + <type class="union"><type>Socket</type><type>false</type></type><methodname>socket_create_listen</methodname> <methodparam><type>int</type><parameter>port</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>backlog</parameter><initializer>128</initializer></methodparam> </methodsynopsis> <para> - <function>socket_create_listen</function> crée une nouvelle - ressource de socket, de type <constant>AF_INET</constant>, mis + <function>socket_create_listen</function> crée une nouvelle instance + de <classname>Socket</classname>, de type <constant>AF_INET</constant>, mis en attente sur <emphasis>toutes</emphasis> les interfaces locales, pour le port <parameter>port</parameter>. </para> @@ -60,9 +59,9 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - <function>socket_create_listen</function> retourne une nouvelle ressource - de socket en cas de succès et &false; en cas d'erreur. Le code d'erreur - généré peut être obtenu en appelant la fonction + <function>socket_create_listen</function> retourne une nouvelle instance + de <classname>Socket</classname> en cas de succès et &false; en cas d'erreur. + Le code d'erreur généré peut être obtenu en appelant la fonction <function>socket_last_error</function>. Ce code d'erreur peut être passé à la fonction <function>socket_strerror</function> pour obtenir un message d'erreur humainement lisible. @@ -80,6 +79,30 @@ </note> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>8.0.0</entry> + <entry> + En cas de succès, cette fonction retourne désormais une instance de + <classname>Socket</classname> ; auparavant, une <type>resource</type> + était retournée. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> @@ -94,7 +117,6 @@ </para> </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-create-pair.xml b/reference/sockets/functions/socket-create-pair.xml index 4426fed370..a5d7afd4c0 100755 --- a/reference/sockets/functions/socket-create-pair.xml +++ b/reference/sockets/functions/socket-create-pair.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 7f569e1f175adf1fbd0e462eba8d6bc82214c939 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-create-pair"> +<refentry xml:id="function.socket-create-pair" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_create_pair</refname> <refpurpose>Crée une paire de sockets identiques et les stocke dans un tableau</refpurpose> @@ -16,11 +15,11 @@ <methodparam><type>int</type><parameter>domain</parameter></methodparam> <methodparam><type>int</type><parameter>type</parameter></methodparam> <methodparam><type>int</type><parameter>protocol</parameter></methodparam> - <methodparam><type>array</type><parameter role="reference">fd</parameter></methodparam> + <methodparam><type>array</type><parameter role="reference">pair</parameter></methodparam> </methodsynopsis> <para> <function>socket_create_pair</function> crée une paire de sockets identiques et les stocke - dans <parameter>fd</parameter>. Cette fonction est utilisée couramment dans + dans <parameter>pair</parameter>. Cette fonction est utilisée couramment dans IPC (<literal>InterProcess Communication</literal>). </para> </refsect1> @@ -70,11 +69,11 @@ </listitem> </varlistentry> <varlistentry> - <term><parameter>fd</parameter></term> + <term><parameter>pair</parameter></term> <listitem> <para> - Une référence vers un tableau dans lequel les deux ressources de sockets - seront insérées. + Une référence vers un tableau dans lequel les deux instances de + <classname>Socket</classname> seront insérées. </para> </listitem> </varlistentry> @@ -89,6 +88,30 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>8.0.0</entry> + <entry> + <parameter>pair</parameter> est une référence à un tableau d'instance de + <classname>Socket</classname> ; auparavant, c'était une référence à un + tableau de <type>resource</type>s. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="examples"> &reftitle.examples; <para> @@ -180,7 +203,6 @@ if ($pid == -1) { </para> </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-create.xml b/reference/sockets/functions/socket-create.xml index fed0032781..eacdaca5a1 100755 --- a/reference/sockets/functions/socket-create.xml +++ b/reference/sockets/functions/socket-create.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: e41806c30bf6975e452c0d4ce35ab0984c2fa68c Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-create"> +<refentry xml:id="function.socket-create" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_create</refname> <refpurpose>Crée un socket</refpurpose> @@ -12,15 +11,15 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <type>resource</type><methodname>socket_create</methodname> + <type class="union"><type>Socket</type><type>false</type></type><methodname>socket_create</methodname> <methodparam><type>int</type><parameter>domain</parameter></methodparam> <methodparam><type>int</type><parameter>type</parameter></methodparam> <methodparam><type>int</type><parameter>protocol</parameter></methodparam> </methodsynopsis> <para> <function>socket_create</function> crée un point de communication - (une socket) et retourne une ressource de socket. Une connexion - typique réseau est composée de deux sockets : + (une socket) et retourne une instance de <classname>Socket</classname> + Une connexion typique réseau est composée de deux sockets : une qui joue le rôle de client et l'autre celui du serveur. </para> </refsect1> @@ -211,15 +210,39 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - <function>socket_create</function> retourne une ressource de - socket en cas de succès et &false; sinon. Le code - d'erreur généré peut être obtenu en appelant la fonction + <function>socket_create</function> retourne une instance de + <classname>Socket</classname> en cas de succès et &false; sinon. + Le code d'erreur généré peut être obtenu en appelant la fonction <function>socket_last_error</function>. Ce code d'erreur peut être passé à la fonction <function>socket_strerror</function> pour obtenir un message d'erreur humainement lisible. </para> </refsect1> - + + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>8.0.0</entry> + <entry> + En cas de succès, cette fonction retourne désormais une instance de + <classname>Socket</classname> ; auparavant, une <type>resource</type> + était retournée. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="errors"> &reftitle.errors; <para> @@ -246,7 +269,6 @@ </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-get-option.xml b/reference/sockets/functions/socket-get-option.xml index 835e4a8015..5c55b5d5ea 100755 --- a/reference/sockets/functions/socket-get-option.xml +++ b/reference/sockets/functions/socket-get-option.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: ba38a95b6a5392bf8562b8148426864bdacd5ef1 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-get-option"> +<refentry xml:id="function.socket-get-option" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_get_option</refname> <refpurpose>Lit les options du socket</refpurpose> @@ -12,14 +11,14 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <type>mixed</type><methodname>socket_get_option</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <type class="union"><type>array</type><type>int</type><type>false</type></type><methodname>socket_get_option</methodname> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> <methodparam><type>int</type><parameter>level</parameter></methodparam> - <methodparam><type>int</type><parameter>optname</parameter></methodparam> + <methodparam><type>int</type><parameter>option</parameter></methodparam> </methodsynopsis> <para> <function>socket_get_option</function> récupère la valeur de l'option - spécifiée par le paramètre <parameter>optname</parameter> pour le socket + spécifiée par le paramètre <parameter>option</parameter> pour le socket spécifié par le paramètre <parameter>socket</parameter>. </para> </refsect1> @@ -32,9 +31,8 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide, créée par la fonction - <function>socket_create</function> ou la fonction - <function>socket_accept</function>. + Une instance de <classname>Socket</classname> créée par + <function>socket_create</function> ou <function>socket_accept</function>. </para> </listitem> </varlistentry> @@ -54,7 +52,7 @@ </listitem> </varlistentry> <varlistentry> - <term><parameter>optname</parameter></term> + <term><parameter>option</parameter></term> <listitem> <table> <title>Options disponibles pour les sockets</title> @@ -70,7 +68,7 @@ <row> <entry><constant>SO_DEBUG</constant></entry> <entry> - Reporte si les informations de déboguage sont enregistrées ou pas. + Reporte si les informations de débogage sont enregistrées ou pas. </entry> <entry> <type>int</type> @@ -443,6 +441,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="examples"> &reftitle.examples; <para> @@ -475,7 +490,6 @@ var_dump(socket_get_option($socket, SOL_SOCKET, SO_REUSEADDR)); </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-getpeername.xml b/reference/sockets/functions/socket-getpeername.xml index 7a1cc691e9..4d70706813 100755 --- a/reference/sockets/functions/socket-getpeername.xml +++ b/reference/sockets/functions/socket-getpeername.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-getpeername"> +<refentry xml:id="function.socket-getpeername" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_getpeername</refname> <refpurpose>Interroge l'autre extrémité de la communication</refpurpose> @@ -13,9 +12,9 @@ &reftitle.description; <methodsynopsis> <type>bool</type><methodname>socket_getpeername</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> <methodparam><type>string</type><parameter role="reference">address</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter role="reference">port</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter role="reference">port</parameter><initializer>&null;</initializer></methodparam> </methodsynopsis> <para> Interroge l'autre extrémité de la communication. @@ -30,9 +29,8 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide, créée par la fonction - <function>socket_create</function> ou la fonction - <function>socket_accept</function>. + Une instance de <classname>Socket</classname> créée par + <function>socket_create</function> ou <function>socket_accept</function>. </para> </listitem> </varlistentry> @@ -80,6 +78,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; <note> @@ -114,7 +129,6 @@ </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-getsockname.xml b/reference/sockets/functions/socket-getsockname.xml index a782a9154e..a2991f3b53 100755 --- a/reference/sockets/functions/socket-getsockname.xml +++ b/reference/sockets/functions/socket-getsockname.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-getsockname"> +<refentry xml:id="function.socket-getsockname" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_getsockname</refname> <refpurpose>Interroge le socket local</refpurpose> @@ -13,9 +12,9 @@ &reftitle.description; <methodsynopsis> <type>bool</type><methodname>socket_getsockname</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> - <methodparam><type>string</type><parameter role="reference">addr</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter role="reference">port</parameter></methodparam> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> + <methodparam><type>string</type><parameter role="reference">address</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter role="reference">port</parameter><initializer>&null;</initializer></methodparam> </methodsynopsis> <note> <simpara> @@ -35,14 +34,13 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide, créée par la fonction - <function>socket_create</function> ou la fonction - <function>socket_accept</function>. + Une instance de <classname>Socket</classname> créée par + <function>socket_create</function> ou <function>socket_accept</function>. </para> </listitem> </varlistentry> <varlistentry> - <term><parameter>addr</parameter></term> + <term><parameter>address</parameter></term> <listitem> <para> Si le socket <parameter>socket</parameter> est de type <constant>AF_INET</constant>, @@ -83,6 +81,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> @@ -95,7 +110,6 @@ </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-import-stream.xml b/reference/sockets/functions/socket-import-stream.xml index 9996cc5ce1..da2f505c3a 100644 --- a/reference/sockets/functions/socket-import-stream.xml +++ b/reference/sockets/functions/socket-import-stream.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: e41806c30bf6975e452c0d4ce35ab0984c2fa68c Maintainer: jpauli Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: jpauli Status: ready --> <!-- Reviewed: no --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-import-stream"> +<refentry xml:id="function.socket-import-stream" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_import_stream</refname> <refpurpose>Importe un flux</refpurpose> @@ -12,7 +11,7 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <type>resource</type><methodname>socket_import_stream</methodname> + <type class="union"><type>Socket</type><type>false</type></type><methodname>socket_import_stream</methodname> <methodparam><type>resource</type><parameter>stream</parameter></methodparam> </methodsynopsis> <para> @@ -39,10 +38,34 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - Retourne &false; ou &null; en cas d'échec. + Retourne &false; en cas d'échec. </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>8.0.0</entry> + <entry> + En cas de succès, cette fonction retourne désormais une instance de + <classname>Socket</classname> ; auparavant, une <type>resource</type> + était retournée. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="examples"> &reftitle.examples; <para> @@ -70,7 +93,6 @@ $sock = socket_import_stream($stream); </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-last-error.xml b/reference/sockets/functions/socket-last-error.xml index a6e765b6b5..023a42b2f0 100755 --- a/reference/sockets/functions/socket-last-error.xml +++ b/reference/sockets/functions/socket-last-error.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 39f908546b68c408a0df21faec8d0f466452ee06 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-last-error"> +<refentry xml:id="function.socket-last-error" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_last_error</refname> <refpurpose>Lit la dernière erreur générée par un socket</refpurpose> @@ -13,12 +12,12 @@ &reftitle.description; <methodsynopsis> <type>int</type><methodname>socket_last_error</methodname> - <methodparam choice="opt"><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam choice="opt"><type class="union"><type>Socket</type><type>null</type></type><parameter>socket</parameter><initializer>&null;</initializer></methodparam> </methodsynopsis> <para> - Si une ressource de socket est passée à cette fonction, la dernière erreur - qui aura été générée par ce socket sera retourné. Si la ressource - de socket est omise, le dernier code d'erreur généré est retourné. + Si une instance de <classname>Socket</classname> est passée à cette fonction, la dernière erreur + qui aura été générée par ce socket sera retourné. Si <parameter>socket</parameter> + est &null;, le dernier code d'erreur généré est retourné. Ce comportement est particulièrement pratique pour des fonctions comme <function>socket_create</function> qui ne retournent pas de socket en cas d'échec, et <function>socket_select</function> qui peut @@ -41,7 +40,7 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide, créée par la fonction + Une instance de <classname>Socket</classname> créée par <function>socket_create</function>. </para> </listitem> @@ -57,6 +56,29 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + <row> + <entry>8.0.0</entry> + <entry> + <parameter>socket</parameter> est désormais nullable. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="examples"> &reftitle.examples; <para> @@ -91,7 +113,6 @@ if ($socket === false) { </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-listen.xml b/reference/sockets/functions/socket-listen.xml index 78e7251aef..8b43b52b5d 100755 --- a/reference/sockets/functions/socket-listen.xml +++ b/reference/sockets/functions/socket-listen.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 4bff852af95deaebf738e8ae2fd4a0dfe282af3f Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-listen"> +<refentry xml:id="function.socket-listen" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_listen</refname> <refpurpose>Attend une connexion sur un socket</refpurpose> @@ -13,7 +12,7 @@ &reftitle.description; <methodsynopsis> <type>bool</type><methodname>socket_listen</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>backlog</parameter><initializer>0</initializer></methodparam> </methodsynopsis> <para> @@ -37,7 +36,7 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide, créée par la fonction + Une instance de <classname>Socket</classname> créée par <function>socket_create</function> ou <function>socket_addrinfo_bind</function>. </para> </listitem> @@ -79,6 +78,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> @@ -94,7 +110,6 @@ </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-read.xml b/reference/sockets/functions/socket-read.xml index 16e1c1c3ca..292c739be7 100755 --- a/reference/sockets/functions/socket-read.xml +++ b/reference/sockets/functions/socket-read.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: e41806c30bf6975e452c0d4ce35ab0984c2fa68c Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-read"> +<refentry xml:id="function.socket-read" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_read</refname> <refpurpose>Lit des données d'un socket</refpurpose> @@ -12,16 +11,15 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <type>string</type><methodname>socket_read</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <type class="union"><type>string</type><type>false</type></type><methodname>socket_read</methodname> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> <methodparam><type>int</type><parameter>length</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>type</parameter><initializer>PHP_BINARY_READ</initializer></methodparam> + <methodparam choice="opt"><type>int</type><parameter>mode</parameter><initializer><constant>PHP_BINARY_READ</constant></initializer></methodparam> </methodsynopsis> <para> - <function>socket_read</function> lit des données dans le socket - <parameter>socket</parameter>, qui doit être une ressource créée par - la fonction <function>socket_create</function> ou la fonction - <function>socket_accept</function>. + <function>socket_read</function> lit des données depuis l'instance de + <classname>Socket</classname> <parameter>socket</parameter>, créée par + <function>socket_create</function> ou <function>socket_accept</function>. </para> </refsect1> @@ -33,9 +31,8 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide, créée par la fonction - <function>socket_create</function> ou la fonction - <function>socket_accept</function>. + Une instance de <classname>Socket</classname> créée par + <function>socket_create</function> ou <function>socket_accept</function>. </para> </listitem> </varlistentry> @@ -44,18 +41,18 @@ <listitem> <para> Elle lit un maximum de <parameter>length</parameter> octets. - Sinon, vous pouvez utiliser <constant>\r</constant>, - <constant>\n</constant> ou <constant>\0</constant> + Sinon, vous pouvez utiliser <constant>\r</constant>, + <constant>\n</constant> ou <constant>\0</constant> pour terminer la lecture (suivant la valeur choisie pour - <parameter>type</parameter>, voir ci-dessous). + <parameter>mode</parameter>, voir ci-dessous). </para> </listitem> </varlistentry> <varlistentry> - <term><parameter>type</parameter></term> + <term><parameter>mode</parameter></term> <listitem> <para> - Le paramètre optionnel <parameter>type</parameter> peut prendre l'une + Le paramètre optionnel <parameter>mode</parameter> peut prendre l'une des valeurs constantes suivantes : <itemizedlist> <listitem> @@ -97,6 +94,23 @@ </note> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> @@ -113,7 +127,6 @@ </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-recv.xml b/reference/sockets/functions/socket-recv.xml index 45a618f43d..4d34dfcbe8 100755 --- a/reference/sockets/functions/socket-recv.xml +++ b/reference/sockets/functions/socket-recv.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 0b26374bc9895dddd5aadc7486f4e4236ef637f9 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-recv"> +<refentry xml:id="function.socket-recv" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_recv</refname> <refpurpose>Reçoit des données d'un socket connecté</refpurpose> @@ -12,24 +11,24 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <type>int</type><methodname>socket_recv</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> - <methodparam><type>string</type><parameter role="reference">buf</parameter></methodparam> - <methodparam><type>int</type><parameter>len</parameter></methodparam> + <type class="union"><type>int</type><type>false</type></type><methodname>socket_recv</methodname> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> + <methodparam><type class="union"><type>string</type><type>null</type></type><parameter role="reference">data</parameter></methodparam> + <methodparam><type>int</type><parameter>length</parameter></methodparam> <methodparam><type>int</type><parameter>flags</parameter></methodparam> </methodsynopsis> <para> La fonction <function>socket_recv</function> reçoit - <parameter>len</parameter> octets de données dans <parameter>buf</parameter> depuis + <parameter>length</parameter> octets de données dans <parameter>data</parameter> depuis <parameter>socket</parameter>. <function>socket_recv</function> peut être utilisée pour récupérer des données depuis des sockets connectés. Aussi, des drapeaux permettent de changer le comportement de la fonction. </para> <para> - <parameter>buf</parameter> est passé par référence, il doit donc être présent + <parameter>data</parameter> est passé par référence, il doit donc être présent dans la liste des arguments. Les données reçues depuis la <parameter>socket</parameter> par <function>socket_recv</function> - seront retournées dans <parameter>buf</parameter>. + seront retournées dans <parameter>data</parameter>. </para> </refsect1> @@ -41,29 +40,29 @@ <term><parameter>socket</parameter></term> <listitem> <para> - <parameter>socket</parameter> doit être une ressource de socket + <parameter>socket</parameter> doit être une instance de <classname>Socket</classname> précédemment créée par socket_create(). </para> </listitem> </varlistentry> <varlistentry> - <term><parameter>buf</parameter></term> + <term><parameter>data</parameter></term> <listitem> <para> Les données reçues seront transmises dans - <parameter>buf</parameter>. Si une erreur survient, si la connexion + <parameter>data</parameter>. Si une erreur survient, si la connexion est fermée ou si aucune donnée n'est disponible, - <parameter>buf</parameter> vaudra alors &null;. + <parameter>data</parameter> vaudra alors &null;. </para> </listitem> </varlistentry> <varlistentry> - <term><parameter>len</parameter></term> + <term><parameter>length</parameter></term> <listitem> <para> - Jusqu'à <parameter>len</parameter> octets seront lus depuis + Jusqu'à <parameter>length</parameter> octets seront lus depuis l'hôte distant. </para> </listitem> @@ -104,8 +103,8 @@ <row> <entry><constant>MSG_WAITALL</constant></entry> <entry> - Bloque avant qu'au moins <parameter>len</parameter> sont reçues. - Cependant, si un signal est intercépté ou si la connexion est + Bloque avant qu'au moins <parameter>length</parameter> sont reçues. + Cependant, si un signal est intercepté ou si la connexion est terminée, la fonction pourra retourner moins de données. </entry> </row> @@ -136,6 +135,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="examples"> &reftitle.examples; <para> @@ -143,7 +159,7 @@ <title>Exemples avec <function>socket_recv</function></title> <para> Cet exemple est une réécriture de l'exemple pris sur - <xref linkend="sockets.examples" /> pour utiliser + <xref linkend="sockets.examples"/> pour utiliser <function>socket_recv</function>. </para> <programlisting role="php"> @@ -227,7 +243,6 @@ OK. </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-recvfrom.xml b/reference/sockets/functions/socket-recvfrom.xml index 9c5c10aab9..839aa906e9 100755 --- a/reference/sockets/functions/socket-recvfrom.xml +++ b/reference/sockets/functions/socket-recvfrom.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 508e255fff6c604c31d5617fe9ddf6d776a3b43d Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-recvfrom"> +<refentry xml:id="function.socket-recvfrom" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_recvfrom</refname> <refpurpose>Reçoit des données d'un socket, connecté ou pas</refpurpose> @@ -12,28 +11,28 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <type>int</type><methodname>socket_recvfrom</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> - <methodparam><type>string</type><parameter role="reference">buf</parameter></methodparam> - <methodparam><type>int</type><parameter>len</parameter></methodparam> + <type class="union"><type>int</type><type>false</type></type><methodname>socket_recvfrom</methodname> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> + <methodparam><type>string</type><parameter role="reference">data</parameter></methodparam> + <methodparam><type>int</type><parameter>length</parameter></methodparam> <methodparam><type>int</type><parameter>flags</parameter></methodparam> - <methodparam><type>string</type><parameter role="reference">name</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter role="reference">port</parameter></methodparam> + <methodparam><type>string</type><parameter role="reference">address</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter role="reference">port</parameter><initializer>&null;</initializer></methodparam> </methodsynopsis> <para> La fonction <function>socket_recvfrom</function> reçoit - <parameter>len</parameter> octets de données du buffer <parameter>buf</parameter> - depuis <parameter>name</parameter> sur le port <parameter>port</parameter> (si le socket + <parameter>length</parameter> octets de données du buffer <parameter>data</parameter> + depuis <parameter>address</parameter> sur le port <parameter>port</parameter> (si le socket n'est pas du type <constant>AF_UNIX</constant>), en utilisant <parameter>socket</parameter>. <function>socket_recvfrom</function> peut être utilisé pour récupérer les données depuis des sockets connectées ou non. De plus, un ou plusieurs drapeaux peuvent être spécifiés pour modifier ce comportement. </para> <para> - Les paramètres <parameter>name</parameter> et <parameter>port</parameter> + Les paramètres <parameter>address</parameter> et <parameter>port</parameter> doivent être passés par référence. Si le socket n'est pas connecté, - <parameter>name</parameter> contiendra l'adresse internet de l'hôte distant ou - le chemin du socket Unix. Si le socket est connecté, <parameter>name</parameter> + <parameter>address</parameter> contiendra l'adresse internet de l'hôte distant ou + le chemin du socket Unix. Si le socket est connecté, <parameter>address</parameter> vaut &null;. De plus, le paramètre <parameter>port</parameter> contiendra le port de l'hôte distant dans le cas d'un socket <constant>AF_INET</constant> ou <constant>AF_INET6</constant>. @@ -49,14 +48,14 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Le paramètre <parameter>socket</parameter> doit être une ressource - de socket créé par la fonction <function>socket_create</function>. + Le paramètre <parameter>socket</parameter> doit être une instance + de <classname>Socket</classname> créé par <function>socket_create</function>. </para> </listitem> </varlistentry> <varlistentry> - <term><parameter>buf</parameter></term> + <term><parameter>data</parameter></term> <listitem> <para> Les données récupérées seront placées dans la variable spécifiée @@ -66,10 +65,10 @@ </varlistentry> <varlistentry> - <term><parameter>len</parameter></term> + <term><parameter>length</parameter></term> <listitem> <para> - Jusqu'à <parameter>len</parameter> octets doivent être récupérés + Jusqu'à <parameter>length</parameter> octets doivent être récupérés de l'hôte distant. </para> </listitem> @@ -109,7 +108,7 @@ <row> <entry><constant>MSG_WAITALL</constant></entry> <entry> - Bloque tant qu'au moins <parameter>len</parameter> octets n'ont pas + Bloque tant qu'au moins <parameter>length</parameter> octets n'ont pas été reçus. Cependant, si un signal est reçu ou l'hôte distant se déconnecte, la fonction pourra retourner moins de données. </entry> @@ -128,12 +127,12 @@ </varlistentry> <varlistentry> - <term><parameter>name</parameter></term> + <term><parameter>address</parameter></term> <listitem> <para> Si le socket est du type <constant>AF_UNIX</constant>, - <parameter>name</parameter> sera le chemin vers ce fichier. Sinon, - pour les sockets non-connectés, <parameter>name</parameter> est l'adresse + <parameter>address</parameter> sera le chemin vers ce fichier. Sinon, + pour les sockets non-connectés, <parameter>address</parameter> est l'adresse IP de l'hôte distant, ou &null; si le socket est connecté. </para> </listitem> @@ -166,6 +165,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="examples"> &reftitle.examples; <para> @@ -207,7 +223,6 @@ echo "Réception de $buf depuis l'adresse distant $from et du port distant $port </para> </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-recvmsg.xml b/reference/sockets/functions/socket-recvmsg.xml index 1069dfea56..1988569e6e 100644 --- a/reference/sockets/functions/socket-recvmsg.xml +++ b/reference/sockets/functions/socket-recvmsg.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 5a3cf6ea6bee7af3b529080aeb18dba8ac1894bd Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-recvmsg"> +<refentry xml:id="function.socket-recvmsg" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_recvmsg</refname> <refpurpose>Lit un message</refpurpose> @@ -11,8 +10,8 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <type>int</type><methodname>socket_recvmsg</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <type class="union"><type>int</type><type>false</type></type><methodname>socket_recvmsg</methodname> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> <methodparam><type>array</type><parameter role="reference">message</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>0</initializer></methodparam> </methodsynopsis> @@ -56,6 +55,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> @@ -67,7 +83,6 @@ </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-select.xml b/reference/sockets/functions/socket-select.xml index b6f60536f1..6918f5eb5f 100755 --- a/reference/sockets/functions/socket-select.xml +++ b/reference/sockets/functions/socket-select.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-select"> +<refentry xml:id="function.socket-select" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_select</refname> <refpurpose>Exécute l'appel système select() sur un tableau de sockets avec une durée d'expiration</refpurpose> @@ -12,18 +11,18 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <type>int</type><methodname>socket_select</methodname> - <methodparam><type>array</type><parameter role="reference">read</parameter></methodparam> - <methodparam><type>array</type><parameter role="reference">write</parameter></methodparam> - <methodparam><type>array</type><parameter role="reference">except</parameter></methodparam> - <methodparam><type>int</type><parameter>tv_sec</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>tv_usec</parameter><initializer>0</initializer></methodparam> + <type class="union"><type>int</type><type>false</type></type><methodname>socket_select</methodname> + <methodparam><type class="union"><type>array</type><type>null</type></type><parameter role="reference">read</parameter></methodparam> + <methodparam><type class="union"><type>array</type><type>null</type></type><parameter role="reference">write</parameter></methodparam> + <methodparam><type class="union"><type>array</type><type>null</type></type><parameter role="reference">except</parameter></methodparam> + <methodparam><type class="union"><type>int</type><type>null</type></type><parameter>seconds</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>microseconds</parameter><initializer>0</initializer></methodparam> </methodsynopsis> <para> <function>socket_select</function> accepte un tableau de sockets et attend qu'elles changent de statut. Ceux qui sont familiers avec les sockets de BSD reconnaîtront dans ces tableaux de sockets les - jeux de pointeurs de fichiers. Trois tableaux indépendants de ressources + jeux de pointeurs de fichiers. Trois tableaux indépendants de sockets sont surveillés. </para> </refsect1> @@ -39,7 +38,7 @@ Les sockets listés dans le paramètre <parameter>read</parameter> seront surveillés en lecture : pour savoir quand ils sont disponibles en lecture (plus précisément, si une lecture - ne va pas bloquer, en particulier, une ressource de socket a déjà + ne va pas bloquer, en particulier, un socket a déjà atteint une fin de fichier, auquel cas <function>socket_read</function> retournera une chaîne de taille zéro). </para> @@ -64,22 +63,22 @@ </listitem> </varlistentry> <varlistentry> - <term><parameter>tv_sec</parameter></term> + <term><parameter>seconds</parameter></term> <listitem> <para> - Les paramètres <parameter>tv_sec</parameter> et <parameter>tv_usec</parameter> + Les paramètres <parameter>seconds</parameter> et <parameter>microseconds</parameter> ensembles forment le paramètre <literal>timeout</literal> (durée de vie). Le <literal>timeout</literal> est la durée maximale de temps avant que <function>socket_select</function> ne se termine. - <parameter>tv_sec</parameter> peut être zéro, ce qui fera que + <parameter>seconds</parameter> peut être zéro, ce qui fera que <function>socket_select</function> retournera immédiatement. C'est très - pratique pour faire du polling (sondage). Si <parameter>tv_sec</parameter> est &null; + pratique pour faire du polling (sondage). Si <parameter>seconds</parameter> est &null; (pas de timeout), <function>socket_select</function> peut se bloquer indéfiniment. </para> </listitem> </varlistentry> <varlistentry> - <term><parameter>tv_usec</parameter></term> + <term><parameter>microseconds</parameter></term> <listitem> <para> </para> @@ -239,7 +238,6 @@ if ($num_changed_sockets === false) { </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-send.xml b/reference/sockets/functions/socket-send.xml index 0b74429ede..f7b67a456a 100755 --- a/reference/sockets/functions/socket-send.xml +++ b/reference/sockets/functions/socket-send.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: e41806c30bf6975e452c0d4ce35ab0984c2fa68c Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-send"> +<refentry xml:id="function.socket-send" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_send</refname> <refpurpose>Envoie des données à un socket connecté</refpurpose> @@ -12,16 +11,16 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <type>int</type><methodname>socket_send</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> - <methodparam><type>string</type><parameter>buf</parameter></methodparam> - <methodparam><type>int</type><parameter>len</parameter></methodparam> + <type class="union"><type>int</type><type>false</type></type><methodname>socket_send</methodname> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> + <methodparam><type>string</type><parameter>data</parameter></methodparam> + <methodparam><type>int</type><parameter>length</parameter></methodparam> <methodparam><type>int</type><parameter>flags</parameter></methodparam> </methodsynopsis> <para> La fonction <function>socket_send</function> envoie - <parameter>len</parameter> octets au socket - <parameter>socket</parameter> depuis le buffer <parameter>buf</parameter>. + <parameter>length</parameter> octets au socket + <parameter>socket</parameter> depuis le buffer <parameter>data</parameter>. </para> </refsect1> @@ -33,14 +32,13 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide, créée par la fonction - <function>socket_create</function> ou la fonction - <function>socket_accept</function>. + Une instance de <classname>Socket</classname> créée par + <function>socket_create</function> ou <function>socket_accept</function>. </para> </listitem> </varlistentry> <varlistentry> - <term><parameter>buf</parameter></term> + <term><parameter>data</parameter></term> <listitem> <para> Un buffer contenant les données qui seront envoyées sur l'hôte distant. @@ -48,11 +46,11 @@ </listitem> </varlistentry> <varlistentry> - <term><parameter>len</parameter></term> + <term><parameter>length</parameter></term> <listitem> <para> Le nombre d'octets qui doivent être envoyés à l'hôte distant - depuis le buffer <parameter>buf</parameter>. + depuis le buffer <parameter>data</parameter>. </para> </listitem> </varlistentry> @@ -111,6 +109,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> @@ -121,7 +136,6 @@ </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-sendmsg.xml b/reference/sockets/functions/socket-sendmsg.xml index 832e527665..c6a9c7543c 100644 --- a/reference/sockets/functions/socket-sendmsg.xml +++ b/reference/sockets/functions/socket-sendmsg.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: b95d28e6ec86e4a71e012737d36ebdc1cf009180 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-sendmsg"> +<refentry xml:id="function.socket-sendmsg" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_sendmsg</refname> <refpurpose>Envoi un message</refpurpose> @@ -12,7 +11,7 @@ &reftitle.description; <methodsynopsis> <type class="union"><type>int</type><type>false</type></type><methodname>socket_sendmsg</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> <methodparam><type>array</type><parameter>message</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>0</initializer></methodparam> </methodsynopsis> @@ -57,6 +56,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> @@ -68,7 +84,6 @@ </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-sendto.xml b/reference/sockets/functions/socket-sendto.xml index 0b64969157..d2c9e20c11 100755 --- a/reference/sockets/functions/socket-sendto.xml +++ b/reference/sockets/functions/socket-sendto.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-sendto"> +<refentry xml:id="function.socket-sendto" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_sendto</refname> <refpurpose>Envoie un message à un socket, qu'il soit connecté ou pas</refpurpose> @@ -12,19 +11,19 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <type>int</type><methodname>socket_sendto</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> - <methodparam><type>string</type><parameter>buf</parameter></methodparam> - <methodparam><type>int</type><parameter>len</parameter></methodparam> + <type class="union"><type>int</type><type>false</type></type><methodname>socket_sendto</methodname> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> + <methodparam><type>string</type><parameter>data</parameter></methodparam> + <methodparam><type>int</type><parameter>length</parameter></methodparam> <methodparam><type>int</type><parameter>flags</parameter></methodparam> - <methodparam><type>string</type><parameter>addr</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>port</parameter><initializer>0</initializer></methodparam> + <methodparam><type>string</type><parameter>address</parameter></methodparam> + <methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>port</parameter><initializer>&null;</initializer></methodparam> </methodsynopsis> <para> - <function>socket_sendto</function> envoie <parameter>len</parameter> - octets issus du buffer <parameter>buf</parameter> via le socket + <function>socket_sendto</function> envoie <parameter>length</parameter> + octets issus du buffer <parameter>data</parameter> via le socket <parameter>socket</parameter>, vers le port <parameter>port</parameter>, - à l'adresse <parameter>addr</parameter>. + à l'adresse <parameter>address</parameter>. </para> </refsect1> @@ -36,25 +35,24 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide, créée par la fonction - <function>socket_create</function>. + Une instance de <classname>Socket</classname> créée par <function>socket_create</function>. </para> </listitem> </varlistentry> <varlistentry> - <term><parameter>buf</parameter></term> + <term><parameter>data</parameter></term> <listitem> <para> Les données à envoyer seront prises depuis le buffer - <parameter>buf</parameter>. + <parameter>data</parameter>. </para> </listitem> </varlistentry> <varlistentry> - <term><parameter>len</parameter></term> + <term><parameter>length</parameter></term> <listitem> <para> - <parameter>len</parameter> octets depuis <parameter>buf</parameter> + <parameter>length</parameter> octets depuis <parameter>data</parameter> doivent être envoyés. </para> </listitem> @@ -103,7 +101,7 @@ </listitem> </varlistentry> <varlistentry> - <term><parameter>addr</parameter></term> + <term><parameter>address</parameter></term> <listitem> <para> L'adresse IP de l'hôte distant. @@ -131,6 +129,28 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + <row> + <entry>8.0.0</entry> + <entry> + <parameter>port</parameter> est désormais nullable. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </refsect1> <refsect1 role="examples"> &reftitle.examples; @@ -164,7 +184,6 @@ socket_close($sock); </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-set-block.xml b/reference/sockets/functions/socket-set-block.xml index 9f6d109e09..74bce9b6e9 100644 --- a/reference/sockets/functions/socket-set-block.xml +++ b/reference/sockets/functions/socket-set-block.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-set-block"> +<refentry xml:id="function.socket-set-block" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_set_block</refname> <refpurpose>Met le socket en mode bloquant</refpurpose> @@ -13,7 +12,7 @@ &reftitle.description; <methodsynopsis> <type>bool</type><methodname>socket_set_block</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> </methodsynopsis> <para> <function>socket_set_block</function> supprime l'option @@ -36,9 +35,8 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide, créée par la fonction - <function>socket_create</function> ou la fonction - <function>socket_accept</function>. + Une instance de <classname>Socket</classname> créée par + <function>socket_create</function> ou <function>socket_accept</function>. </para> </listitem> </varlistentry> @@ -53,6 +51,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="examples"> &reftitle.examples; <para> @@ -89,7 +104,6 @@ socket_accept($socket); </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-set-nonblock.xml b/reference/sockets/functions/socket-set-nonblock.xml index 1f1bb63e0c..9dabcf8813 100755 --- a/reference/sockets/functions/socket-set-nonblock.xml +++ b/reference/sockets/functions/socket-set-nonblock.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 8c9e28bc675036915ccd7e7069aa755d0d51b950 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-set-nonblock"> +<refentry xml:id="function.socket-set-nonblock" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_set_nonblock</refname> <refpurpose>Sélectionne le mode non bloquant d'un pointeur de fichier</refpurpose> @@ -13,7 +12,7 @@ &reftitle.description; <methodsynopsis> <type>bool</type><methodname>socket_set_nonblock</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> </methodsynopsis> <para> La fonction <function>socket_set_nonblock</function> configure l'option @@ -36,9 +35,8 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide, créée par la fonction - <function>socket_create</function> ou la fonction - <function>socket_accept</function>. + Une instance de <classname>Socket</classname> créée par + <function>socket_create</function> ou <function>socket_accept</function>. </para> </listitem> </varlistentry> @@ -53,6 +51,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="examples"> &reftitle.examples; <para> @@ -90,7 +105,6 @@ socket_accept($socket); </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-set-option.xml b/reference/sockets/functions/socket-set-option.xml index 490dd888c2..eaec663983 100755 --- a/reference/sockets/functions/socket-set-option.xml +++ b/reference/sockets/functions/socket-set-option.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 0a58f121e638b8c8606053cb9586b356bb414238 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-set-option"> +<refentry xml:id="function.socket-set-option" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_set_option</refname> <refpurpose>Modifie les options de socket</refpurpose> @@ -13,16 +12,16 @@ &reftitle.description; <methodsynopsis> <type>bool</type><methodname>socket_set_option</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> <methodparam><type>int</type><parameter>level</parameter></methodparam> - <methodparam><type>int</type><parameter>optname</parameter></methodparam> - <methodparam><type>mixed</type><parameter>optval</parameter></methodparam> + <methodparam><type>int</type><parameter>option</parameter></methodparam> + <methodparam><type class="union"><type>array</type><type>string</type><type>int</type></type><parameter>value</parameter></methodparam> </methodsynopsis> <para> <function>socket_set_option</function> configure l'option spécifiée par - <parameter>optname</parameter>, au niveau de protocole + <parameter>option</parameter>, au niveau de protocole <parameter>level</parameter> à la valeur pointée par - <parameter>optval</parameter> pour le socket spécifié par + <parameter>value</parameter> pour le socket spécifié par <parameter>socket</parameter>. </para> </refsect1> @@ -35,9 +34,8 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide, créée par la fonction - <function>socket_create</function> ou la fonction - <function>socket_accept</function>. + Une instance de <classname>Socket</classname> créée par + <function>socket_create</function> ou <function>socket_accept</function>. </para> </listitem> </varlistentry> @@ -56,7 +54,7 @@ </listitem> </varlistentry> <varlistentry> - <term><parameter>optname</parameter></term> + <term><parameter>option</parameter></term> <listitem> <para> Les options disponibles sont les mêmes que pour @@ -65,7 +63,7 @@ </listitem> </varlistentry> <varlistentry> - <term><parameter>optval</parameter></term> + <term><parameter>value</parameter></term> <listitem> <para> La valeur de l'option. @@ -83,6 +81,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="examples"> &reftitle.examples; <para> @@ -133,7 +148,6 @@ if ($rval === false) { </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-shutdown.xml b/reference/sockets/functions/socket-shutdown.xml index 452aea28de..2ac55c7b15 100755 --- a/reference/sockets/functions/socket-shutdown.xml +++ b/reference/sockets/functions/socket-shutdown.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 77386c9ed685b4dac0ade2184b2d4e5d9dc54868 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-shutdown"> +<refentry xml:id="function.socket-shutdown" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_shutdown</refname> <refpurpose>Éteint un socket en lecture et/ou écriture</refpurpose> @@ -13,8 +12,8 @@ &reftitle.description; <methodsynopsis> <type>bool</type><methodname>socket_shutdown</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>how</parameter><initializer>2</initializer></methodparam> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>mode</parameter><initializer>2</initializer></methodparam> </methodsynopsis> <para> <function>socket_shutdown</function> vous permet d'empêcher les données @@ -23,7 +22,7 @@ </para> <note> <para> - Le ou les buffers associés peuvent, ou peuvent ne pas etre vidés. + Le ou les buffers associés peuvent, ou peuvent ne pas être vidés. </para> </note> </refsect1> @@ -36,19 +35,18 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide, créée par la fonction - <function>socket_create</function>. + Une instance de <classname>Socket</classname> créée par <function>socket_create</function>. </para> </listitem> </varlistentry> <varlistentry> - <term><parameter>how</parameter></term> + <term><parameter>mode</parameter></term> <listitem> <para> - La valeur du paramètre <parameter>how</parameter> peut être une + La valeur du paramètre <parameter>mode</parameter> peut être une des valeurs suivantes : <table> - <title>Valeurs possibles pour <parameter>how</parameter></title> + <title>Valeurs possibles pour <parameter>mode</parameter></title> <tgroup cols="2"> <tbody> <row> @@ -86,8 +84,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-strerror.xml b/reference/sockets/functions/socket-strerror.xml index fad5227aa0..c737c234df 100755 --- a/reference/sockets/functions/socket-strerror.xml +++ b/reference/sockets/functions/socket-strerror.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-strerror"> +<refentry xml:id="function.socket-strerror" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_strerror</refname> <refpurpose>Retourne une chaîne décrivant un message d'erreur</refpurpose> @@ -13,11 +12,11 @@ &reftitle.description; <methodsynopsis> <type>string</type><methodname>socket_strerror</methodname> - <methodparam><type>int</type><parameter>errno</parameter></methodparam> + <methodparam><type>int</type><parameter>error_code</parameter></methodparam> </methodsynopsis> <para> <function>socket_strerror</function> prend un code d'erreur comme paramètre - <parameter>errno</parameter>. Cette valeur est souvent retournée par la + <parameter>error_code</parameter>. Cette valeur est souvent retournée par la fonction <function>socket_last_error</function>. La fonction retourne le message d'erreur correspondant. </para> @@ -35,7 +34,7 @@ <para> <variablelist> <varlistentry> - <term><parameter>errno</parameter></term> + <term><parameter>error_code</parameter></term> <listitem> <para> Une numéro d'erreur de socket valide, comme produit par la fonction @@ -51,7 +50,7 @@ &reftitle.returnvalues; <para> Retourne le message d'erreur associé avec le paramètre - <parameter>errno</parameter>. + <parameter>error_code</parameter>. </para> </refsect1> @@ -100,7 +99,6 @@ socket_bind() a échoué : raison : Permission denied </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-write.xml b/reference/sockets/functions/socket-write.xml index fa188ff901..036f8a3e72 100755 --- a/reference/sockets/functions/socket-write.xml +++ b/reference/sockets/functions/socket-write.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: b95d28e6ec86e4a71e012737d36ebdc1cf009180 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-write"> +<refentry xml:id="function.socket-write" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_write</refname> <refpurpose>Écrit dans un socket</refpurpose> @@ -13,14 +12,14 @@ &reftitle.description; <methodsynopsis> <type class="union"><type>int</type><type>false</type></type><methodname>socket_write</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> - <methodparam><type>string</type><parameter>buffer</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>length</parameter><initializer>0</initializer></methodparam> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> + <methodparam><type>string</type><parameter>data</parameter></methodparam> + <methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>length</parameter><initializer>&null;</initializer></methodparam> </methodsynopsis> <para> <function>socket_write</function> écrit dans le socket <parameter>socket</parameter> les données du buffer - <parameter>buffer</parameter>. + <parameter>data</parameter>. </para> </refsect1> @@ -36,7 +35,7 @@ </listitem> </varlistentry> <varlistentry> - <term><parameter>buffer</parameter></term> + <term><parameter>data</parameter></term> <listitem> <para> Le buffer à écrire. @@ -79,6 +78,29 @@ </note> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + <row> + <entry>8.0.0</entry> + <entry> + <parameter>length</parameter> est désormais nullable. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; <note> @@ -108,7 +130,6 @@ </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/setup.xml b/reference/sockets/setup.xml index 7cddb581b8..8c7c312c1c 100644 --- a/reference/sockets/setup.xml +++ b/reference/sockets/setup.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 323eb8f48d7333301a5b01559508e4d7dd15cbea Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> <chapter xml:id="sockets.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> @@ -28,13 +28,15 @@ <section xml:id="sockets.resources"> &reftitle.resources; <para> + Antérieur à PHP 8.0.0, <function>socket_accept</function>, <function>socket_import_stream</function>, <function>socket_addrinfo_connect</function>, <function>socket_addrinfo_bind</function>, <function>socket_create_listen</function>, <function>socket_wsaprotocol_info_import</function> et - <function>socket_create</function> retournent des ressources sur les sockets. + <function>socket_create</function> retournaient des ressources Socket. </para> <para> - <function>socket_addrinfo_lookup</function> retourne un tableau de ressources AddressInfo. + Antérieur à PHP 8.0.0, + <function>socket_addrinfo_lookup</function> retournait un tableau de ressources AddressInfo. </para> </section> <!-- }}} -->
diff --git a/language-snippets.ent b/language-snippets.ent index 61d9ebaf88..a528f00fbe 100644 --- a/language-snippets.ent +++ b/language-snippets.ent @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: c47cd3156640f6fddbb20ed1c8b5c86a706f9b0e Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> <!-- Relecture des Notes, Précautions, Avertissements, Astuces, Divers et Retour le 2018-12-29 par girgias --> @@ -1169,6 +1169,24 @@ de mot de passe</link> représentant l'algorithme à utiliser lors du hachag <!ENTITY password.parameter.password 'Le mot de passe utilisateur.'> +<!-- socket entities --> + +<!ENTITY sockets.changelog.socket-param '<row xmlns="http://docbook.org/ns/docbook"> + <entry>8.0.0</entry> + <entry> + <parameter>socket</parameter> est désormais une instance de <classname>Socket</classname> ; + auparavant, c'était une <type>resource</type>. + </entry> +</row>'> + +<!ENTITY sockets.changelog.address-param '<row xmlns="http://docbook.org/ns/docbook"> + <entry>8.0.0</entry> + <entry> + <parameter>address</parameter> est désormais une instance de <classname>AddressInfo</classname> ; + auparavant, c'était une <type>resource</type>. + </entry> +</row>'> + <!-- geaman notes --> <!ENTITY gearman.parameter.host 'Le nom d'hôte du serveur de travaux.'> diff --git a/reference/sockets/functions/socket-accept.xml b/reference/sockets/functions/socket-accept.xml index ebb9a43560..504e319c32 100755 --- a/reference/sockets/functions/socket-accept.xml +++ b/reference/sockets/functions/socket-accept.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: e41806c30bf6975e452c0d4ce35ab0984c2fa68c Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-accept"> +<refentry xml:id="function.socket-accept" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_accept</refname> <refpurpose>Accepte une connexion sur un socket</refpurpose> @@ -12,8 +11,8 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <type>resource</type><methodname>socket_accept</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <type class="union"><type>Socket</type><type>false</type></type><methodname>socket_accept</methodname> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> </methodsynopsis> <para> Une fois que le socket <parameter>socket</parameter> a été créé avec la @@ -21,8 +20,8 @@ <function>socket_bind</function>, et mis en attente de connexion avec la fonction <function>socket_listen</function>, <function>socket_accept</function> va accepter les connexions sur ce - socket. Une fois qu'une connexion est faite, une nouvelle ressource de - socket est retournée. Elle peut être utilisée pour les communications. + socket. Une fois qu'une connexion est faite, une nouvelle instance de + <classname>Socket</classname> est retournée. Elle peut être utilisée pour les communications. S'il y a plusieurs connexions en attente, la première sera utilisée. S'il n'y a pas de connexion en attente, <function>socket_accept</function> se bloquera jusqu'à ce qu'une connexion se présente. Si @@ -31,7 +30,7 @@ <function>socket_set_nonblock</function>, &false; sera retourné. </para> <para> - La ressource de socket retournée par + L'instance de <classname>Socket</classname> retournée par <function>socket_accept</function> ne doit pas être utilisée pour accepter de nouvelles connexions. Le socket original <parameter>socket</parameter>, qui est en attente, reste ouvert @@ -47,8 +46,7 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide, créée par - la fonction <function>socket_create</function>. + Une instance de <classname>Socket</classname> créée par <function>socket_create</function>. </para> </listitem> </varlistentry> @@ -59,7 +57,7 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - Retourne une nouvelle ressource de socket en cas de succès ou &false; en cas + Retourne une nouvelle instance de <classname>Socket</classname> en cas de succès ou &false; en cas d'erreur. Le code d'erreur généré peut être obtenu en appelant la fonction <function>socket_last_error</function>. Ce code d'erreur peut être passé à la fonction <function>socket_strerror</function> pour obtenir un message @@ -67,6 +65,29 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>8.0.0</entry> + <entry> + En cas de succès, cette fonction retourne désormais une instance de <classname>Socket</classname> ; + auparavant, une <type>resource</type> était retournée. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> @@ -80,7 +101,6 @@ </para> </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-bind.xml b/reference/sockets/functions/socket-bind.xml index 2209ecffb5..9ca50743f5 100755 --- a/reference/sockets/functions/socket-bind.xml +++ b/reference/sockets/functions/socket-bind.xml @@ -1,8 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 8e291b4d3798b4f54060b0b6cfb6500762a8b97a Maintainer: jpauli Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: jpauli Status: ready --> <!-- Reviewed: yes --> - <refentry xml:id="function.socket-bind" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_bind</refname> @@ -13,7 +12,7 @@ &reftitle.description; <methodsynopsis> <type>bool</type><methodname>socket_bind</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> <methodparam><type>string</type><parameter>address</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>port</parameter><initializer>0</initializer></methodparam> </methodsynopsis> @@ -33,7 +32,7 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide créée par la fonction <function>socket_create</function>. + Une instance de <classname>Socket</classname> créée par <function>socket_create</function>. </para> </listitem> </varlistentry> @@ -76,6 +75,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="examples"> &reftitle.examples; <para> @@ -143,7 +159,6 @@ socket_close($sock); </para> </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-clear-error.xml b/reference/sockets/functions/socket-clear-error.xml index ba360a64a7..2785357267 100755 --- a/reference/sockets/functions/socket-clear-error.xml +++ b/reference/sockets/functions/socket-clear-error.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-clear-error"> +<refentry xml:id="function.socket-clear-error" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_clear_error</refname> <refpurpose>Efface toutes les erreurs précédemment générées par un socket</refpurpose> @@ -13,7 +12,7 @@ &reftitle.description; <methodsynopsis> <type>void</type><methodname>socket_clear_error</methodname> - <methodparam choice="opt"><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam choice="opt"><type class="union"><type>Socket</type><type>null</type></type><parameter>socket</parameter><initializer>&null;</initializer></methodparam> </methodsynopsis> <para> Efface tous les codes d'erreur qui ont été enregistrés pour le socket @@ -35,8 +34,7 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide, créée par la fonction - <function>socket_create</function>. + Une instance de <classname>Socket</classname> créée par <function>socket_create</function>. </para> </listitem> </varlistentry> @@ -51,6 +49,29 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + <row> + <entry>8.0.0</entry> + <entry> + <parameter>socket</parameter> est désormais nullable. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> @@ -62,7 +83,6 @@ </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-close.xml b/reference/sockets/functions/socket-close.xml index 018f6bca91..6cea2402fc 100755 --- a/reference/sockets/functions/socket-close.xml +++ b/reference/sockets/functions/socket-close.xml @@ -1,25 +1,22 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-close"> +<refentry xml:id="function.socket-close" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_close</refname> - <refpurpose>Ferme un socket</refpurpose> + <refpurpose>Ferme une instance de <classname>Socket</classname></refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>void</type><methodname>socket_close</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> </methodsynopsis> <para> - <function>socket_close</function> ferme le socket - <parameter>socket</parameter> et détruit toutes les ressources qui y sont - liées. Cette fonction est spécifique aux sockets et ne peut être utilisée - avec les autres types de ressource. + <function>socket_close</function> ferme l'instance <classname>Socket</classname> + fournis par <parameter>socket</parameter>. </para> </refsect1> @@ -31,9 +28,8 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide, créée par la fonction - <function>socket_create</function> ou la fonction - <function>socket_accept</function>. + Une instance de <classname>Socket</classname> créée par <function>socket_create</function> + ou <function>socket_accept</function>. </para> </listitem> </varlistentry> @@ -48,6 +44,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> @@ -61,7 +74,6 @@ </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-cmsg-space.xml b/reference/sockets/functions/socket-cmsg-space.xml index 6b211b528a..d9504bc0fc 100644 --- a/reference/sockets/functions/socket-cmsg-space.xml +++ b/reference/sockets/functions/socket-cmsg-space.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: fa994a739c769e155f6b6848f66f1f9a24ec9eb0 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-cmsg-space"> +<refentry xml:id="function.socket-cmsg-space" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_cmsg_space</refname> <refpurpose>Calcule la taille du buffer</refpurpose> @@ -11,10 +10,10 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <type>int</type><methodname>socket_cmsg_space</methodname> + <type class="union"><type>int</type><type>null</type></type><methodname>socket_cmsg_space</methodname> <methodparam><type>int</type><parameter>level</parameter></methodparam> <methodparam><type>int</type><parameter>type</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>n</parameter><initializer>0</initializer></methodparam> + <methodparam choice="opt"><type>int</type><parameter>num</parameter><initializer>0</initializer></methodparam> </methodsynopsis> <para> Calcule la taille du buffer qui doit être allouée pour recevoir les @@ -62,7 +61,6 @@ </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-connect.xml b/reference/sockets/functions/socket-connect.xml index 8479a0bc51..0d860a5185 100755 --- a/reference/sockets/functions/socket-connect.xml +++ b/reference/sockets/functions/socket-connect.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-connect"> +<refentry xml:id="function.socket-connect" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_connect</refname> <refpurpose>Crée une connexion sur un socket</refpurpose> @@ -13,14 +12,14 @@ &reftitle.description; <methodsynopsis> <type>bool</type><methodname>socket_connect</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> <methodparam><type>string</type><parameter>address</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>port</parameter><initializer>0</initializer></methodparam> + <methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>port</parameter><initializer>&null;</initializer></methodparam> </methodsynopsis> <para> - Crée une nouvelle connexion en utilisant la ressource socket - <parameter>socket</parameter>, qui doit être une ressource de - socket valide, créée par la fonction <function>socket_create</function>. + Crée une nouvelle connexion en utilisant l'instance <classname>Socket</classname> + <parameter>socket</parameter>, qui doit être une instance de + <classname>Socket</classname> créée par <function>socket_create</function>. </para> </refsect1> @@ -81,6 +80,29 @@ </note> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + <row> + <entry>8.0.0</entry> + <entry> + <parameter>port</parameter> est désormais nullable. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> @@ -95,7 +117,6 @@ </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-create-listen.xml b/reference/sockets/functions/socket-create-listen.xml index dd71a94cb7..fd077d2c32 100755 --- a/reference/sockets/functions/socket-create-listen.xml +++ b/reference/sockets/functions/socket-create-listen.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: e41806c30bf6975e452c0d4ce35ab0984c2fa68c Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-create-listen"> +<refentry xml:id="function.socket-create-listen" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_create_listen</refname> <refpurpose>Ouvre un socket sur un port pour accepter les connexions</refpurpose> @@ -12,13 +11,13 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <type>resource</type><methodname>socket_create_listen</methodname> + <type class="union"><type>Socket</type><type>false</type></type><methodname>socket_create_listen</methodname> <methodparam><type>int</type><parameter>port</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>backlog</parameter><initializer>128</initializer></methodparam> </methodsynopsis> <para> - <function>socket_create_listen</function> crée une nouvelle - ressource de socket, de type <constant>AF_INET</constant>, mis + <function>socket_create_listen</function> crée une nouvelle instance + de <classname>Socket</classname>, de type <constant>AF_INET</constant>, mis en attente sur <emphasis>toutes</emphasis> les interfaces locales, pour le port <parameter>port</parameter>. </para> @@ -60,9 +59,9 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - <function>socket_create_listen</function> retourne une nouvelle ressource - de socket en cas de succès et &false; en cas d'erreur. Le code d'erreur - généré peut être obtenu en appelant la fonction + <function>socket_create_listen</function> retourne une nouvelle instance + de <classname>Socket</classname> en cas de succès et &false; en cas d'erreur. + Le code d'erreur généré peut être obtenu en appelant la fonction <function>socket_last_error</function>. Ce code d'erreur peut être passé à la fonction <function>socket_strerror</function> pour obtenir un message d'erreur humainement lisible. @@ -80,6 +79,30 @@ </note> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>8.0.0</entry> + <entry> + En cas de succès, cette fonction retourne désormais une instance de + <classname>Socket</classname> ; auparavant, une <type>resource</type> + était retournée. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> @@ -94,7 +117,6 @@ </para> </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-create-pair.xml b/reference/sockets/functions/socket-create-pair.xml index 4426fed370..a5d7afd4c0 100755 --- a/reference/sockets/functions/socket-create-pair.xml +++ b/reference/sockets/functions/socket-create-pair.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 7f569e1f175adf1fbd0e462eba8d6bc82214c939 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-create-pair"> +<refentry xml:id="function.socket-create-pair" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_create_pair</refname> <refpurpose>Crée une paire de sockets identiques et les stocke dans un tableau</refpurpose> @@ -16,11 +15,11 @@ <methodparam><type>int</type><parameter>domain</parameter></methodparam> <methodparam><type>int</type><parameter>type</parameter></methodparam> <methodparam><type>int</type><parameter>protocol</parameter></methodparam> - <methodparam><type>array</type><parameter role="reference">fd</parameter></methodparam> + <methodparam><type>array</type><parameter role="reference">pair</parameter></methodparam> </methodsynopsis> <para> <function>socket_create_pair</function> crée une paire de sockets identiques et les stocke - dans <parameter>fd</parameter>. Cette fonction est utilisée couramment dans + dans <parameter>pair</parameter>. Cette fonction est utilisée couramment dans IPC (<literal>InterProcess Communication</literal>). </para> </refsect1> @@ -70,11 +69,11 @@ </listitem> </varlistentry> <varlistentry> - <term><parameter>fd</parameter></term> + <term><parameter>pair</parameter></term> <listitem> <para> - Une référence vers un tableau dans lequel les deux ressources de sockets - seront insérées. + Une référence vers un tableau dans lequel les deux instances de + <classname>Socket</classname> seront insérées. </para> </listitem> </varlistentry> @@ -89,6 +88,30 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>8.0.0</entry> + <entry> + <parameter>pair</parameter> est une référence à un tableau d'instance de + <classname>Socket</classname> ; auparavant, c'était une référence à un + tableau de <type>resource</type>s. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="examples"> &reftitle.examples; <para> @@ -180,7 +203,6 @@ if ($pid == -1) { </para> </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-create.xml b/reference/sockets/functions/socket-create.xml index fed0032781..eacdaca5a1 100755 --- a/reference/sockets/functions/socket-create.xml +++ b/reference/sockets/functions/socket-create.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: e41806c30bf6975e452c0d4ce35ab0984c2fa68c Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-create"> +<refentry xml:id="function.socket-create" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_create</refname> <refpurpose>Crée un socket</refpurpose> @@ -12,15 +11,15 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <type>resource</type><methodname>socket_create</methodname> + <type class="union"><type>Socket</type><type>false</type></type><methodname>socket_create</methodname> <methodparam><type>int</type><parameter>domain</parameter></methodparam> <methodparam><type>int</type><parameter>type</parameter></methodparam> <methodparam><type>int</type><parameter>protocol</parameter></methodparam> </methodsynopsis> <para> <function>socket_create</function> crée un point de communication - (une socket) et retourne une ressource de socket. Une connexion - typique réseau est composée de deux sockets : + (une socket) et retourne une instance de <classname>Socket</classname> + Une connexion typique réseau est composée de deux sockets : une qui joue le rôle de client et l'autre celui du serveur. </para> </refsect1> @@ -211,15 +210,39 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - <function>socket_create</function> retourne une ressource de - socket en cas de succès et &false; sinon. Le code - d'erreur généré peut être obtenu en appelant la fonction + <function>socket_create</function> retourne une instance de + <classname>Socket</classname> en cas de succès et &false; sinon. + Le code d'erreur généré peut être obtenu en appelant la fonction <function>socket_last_error</function>. Ce code d'erreur peut être passé à la fonction <function>socket_strerror</function> pour obtenir un message d'erreur humainement lisible. </para> </refsect1> - + + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>8.0.0</entry> + <entry> + En cas de succès, cette fonction retourne désormais une instance de + <classname>Socket</classname> ; auparavant, une <type>resource</type> + était retournée. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="errors"> &reftitle.errors; <para> @@ -246,7 +269,6 @@ </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-get-option.xml b/reference/sockets/functions/socket-get-option.xml index 835e4a8015..5c55b5d5ea 100755 --- a/reference/sockets/functions/socket-get-option.xml +++ b/reference/sockets/functions/socket-get-option.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: ba38a95b6a5392bf8562b8148426864bdacd5ef1 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-get-option"> +<refentry xml:id="function.socket-get-option" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_get_option</refname> <refpurpose>Lit les options du socket</refpurpose> @@ -12,14 +11,14 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <type>mixed</type><methodname>socket_get_option</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <type class="union"><type>array</type><type>int</type><type>false</type></type><methodname>socket_get_option</methodname> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> <methodparam><type>int</type><parameter>level</parameter></methodparam> - <methodparam><type>int</type><parameter>optname</parameter></methodparam> + <methodparam><type>int</type><parameter>option</parameter></methodparam> </methodsynopsis> <para> <function>socket_get_option</function> récupère la valeur de l'option - spécifiée par le paramètre <parameter>optname</parameter> pour le socket + spécifiée par le paramètre <parameter>option</parameter> pour le socket spécifié par le paramètre <parameter>socket</parameter>. </para> </refsect1> @@ -32,9 +31,8 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide, créée par la fonction - <function>socket_create</function> ou la fonction - <function>socket_accept</function>. + Une instance de <classname>Socket</classname> créée par + <function>socket_create</function> ou <function>socket_accept</function>. </para> </listitem> </varlistentry> @@ -54,7 +52,7 @@ </listitem> </varlistentry> <varlistentry> - <term><parameter>optname</parameter></term> + <term><parameter>option</parameter></term> <listitem> <table> <title>Options disponibles pour les sockets</title> @@ -70,7 +68,7 @@ <row> <entry><constant>SO_DEBUG</constant></entry> <entry> - Reporte si les informations de déboguage sont enregistrées ou pas. + Reporte si les informations de débogage sont enregistrées ou pas. </entry> <entry> <type>int</type> @@ -443,6 +441,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="examples"> &reftitle.examples; <para> @@ -475,7 +490,6 @@ var_dump(socket_get_option($socket, SOL_SOCKET, SO_REUSEADDR)); </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-getpeername.xml b/reference/sockets/functions/socket-getpeername.xml index 7a1cc691e9..4d70706813 100755 --- a/reference/sockets/functions/socket-getpeername.xml +++ b/reference/sockets/functions/socket-getpeername.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-getpeername"> +<refentry xml:id="function.socket-getpeername" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_getpeername</refname> <refpurpose>Interroge l'autre extrémité de la communication</refpurpose> @@ -13,9 +12,9 @@ &reftitle.description; <methodsynopsis> <type>bool</type><methodname>socket_getpeername</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> <methodparam><type>string</type><parameter role="reference">address</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter role="reference">port</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter role="reference">port</parameter><initializer>&null;</initializer></methodparam> </methodsynopsis> <para> Interroge l'autre extrémité de la communication. @@ -30,9 +29,8 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide, créée par la fonction - <function>socket_create</function> ou la fonction - <function>socket_accept</function>. + Une instance de <classname>Socket</classname> créée par + <function>socket_create</function> ou <function>socket_accept</function>. </para> </listitem> </varlistentry> @@ -80,6 +78,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; <note> @@ -114,7 +129,6 @@ </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-getsockname.xml b/reference/sockets/functions/socket-getsockname.xml index a782a9154e..a2991f3b53 100755 --- a/reference/sockets/functions/socket-getsockname.xml +++ b/reference/sockets/functions/socket-getsockname.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-getsockname"> +<refentry xml:id="function.socket-getsockname" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_getsockname</refname> <refpurpose>Interroge le socket local</refpurpose> @@ -13,9 +12,9 @@ &reftitle.description; <methodsynopsis> <type>bool</type><methodname>socket_getsockname</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> - <methodparam><type>string</type><parameter role="reference">addr</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter role="reference">port</parameter></methodparam> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> + <methodparam><type>string</type><parameter role="reference">address</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter role="reference">port</parameter><initializer>&null;</initializer></methodparam> </methodsynopsis> <note> <simpara> @@ -35,14 +34,13 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide, créée par la fonction - <function>socket_create</function> ou la fonction - <function>socket_accept</function>. + Une instance de <classname>Socket</classname> créée par + <function>socket_create</function> ou <function>socket_accept</function>. </para> </listitem> </varlistentry> <varlistentry> - <term><parameter>addr</parameter></term> + <term><parameter>address</parameter></term> <listitem> <para> Si le socket <parameter>socket</parameter> est de type <constant>AF_INET</constant>, @@ -83,6 +81,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> @@ -95,7 +110,6 @@ </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-import-stream.xml b/reference/sockets/functions/socket-import-stream.xml index 9996cc5ce1..da2f505c3a 100644 --- a/reference/sockets/functions/socket-import-stream.xml +++ b/reference/sockets/functions/socket-import-stream.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: e41806c30bf6975e452c0d4ce35ab0984c2fa68c Maintainer: jpauli Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: jpauli Status: ready --> <!-- Reviewed: no --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-import-stream"> +<refentry xml:id="function.socket-import-stream" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_import_stream</refname> <refpurpose>Importe un flux</refpurpose> @@ -12,7 +11,7 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <type>resource</type><methodname>socket_import_stream</methodname> + <type class="union"><type>Socket</type><type>false</type></type><methodname>socket_import_stream</methodname> <methodparam><type>resource</type><parameter>stream</parameter></methodparam> </methodsynopsis> <para> @@ -39,10 +38,34 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - Retourne &false; ou &null; en cas d'échec. + Retourne &false; en cas d'échec. </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>8.0.0</entry> + <entry> + En cas de succès, cette fonction retourne désormais une instance de + <classname>Socket</classname> ; auparavant, une <type>resource</type> + était retournée. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="examples"> &reftitle.examples; <para> @@ -70,7 +93,6 @@ $sock = socket_import_stream($stream); </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-last-error.xml b/reference/sockets/functions/socket-last-error.xml index a6e765b6b5..023a42b2f0 100755 --- a/reference/sockets/functions/socket-last-error.xml +++ b/reference/sockets/functions/socket-last-error.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 39f908546b68c408a0df21faec8d0f466452ee06 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-last-error"> +<refentry xml:id="function.socket-last-error" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_last_error</refname> <refpurpose>Lit la dernière erreur générée par un socket</refpurpose> @@ -13,12 +12,12 @@ &reftitle.description; <methodsynopsis> <type>int</type><methodname>socket_last_error</methodname> - <methodparam choice="opt"><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam choice="opt"><type class="union"><type>Socket</type><type>null</type></type><parameter>socket</parameter><initializer>&null;</initializer></methodparam> </methodsynopsis> <para> - Si une ressource de socket est passée à cette fonction, la dernière erreur - qui aura été générée par ce socket sera retourné. Si la ressource - de socket est omise, le dernier code d'erreur généré est retourné. + Si une instance de <classname>Socket</classname> est passée à cette fonction, la dernière erreur + qui aura été générée par ce socket sera retourné. Si <parameter>socket</parameter> + est &null;, le dernier code d'erreur généré est retourné. Ce comportement est particulièrement pratique pour des fonctions comme <function>socket_create</function> qui ne retournent pas de socket en cas d'échec, et <function>socket_select</function> qui peut @@ -41,7 +40,7 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide, créée par la fonction + Une instance de <classname>Socket</classname> créée par <function>socket_create</function>. </para> </listitem> @@ -57,6 +56,29 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + <row> + <entry>8.0.0</entry> + <entry> + <parameter>socket</parameter> est désormais nullable. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="examples"> &reftitle.examples; <para> @@ -91,7 +113,6 @@ if ($socket === false) { </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-listen.xml b/reference/sockets/functions/socket-listen.xml index 78e7251aef..8b43b52b5d 100755 --- a/reference/sockets/functions/socket-listen.xml +++ b/reference/sockets/functions/socket-listen.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 4bff852af95deaebf738e8ae2fd4a0dfe282af3f Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-listen"> +<refentry xml:id="function.socket-listen" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_listen</refname> <refpurpose>Attend une connexion sur un socket</refpurpose> @@ -13,7 +12,7 @@ &reftitle.description; <methodsynopsis> <type>bool</type><methodname>socket_listen</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>backlog</parameter><initializer>0</initializer></methodparam> </methodsynopsis> <para> @@ -37,7 +36,7 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide, créée par la fonction + Une instance de <classname>Socket</classname> créée par <function>socket_create</function> ou <function>socket_addrinfo_bind</function>. </para> </listitem> @@ -79,6 +78,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> @@ -94,7 +110,6 @@ </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-read.xml b/reference/sockets/functions/socket-read.xml index 16e1c1c3ca..292c739be7 100755 --- a/reference/sockets/functions/socket-read.xml +++ b/reference/sockets/functions/socket-read.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: e41806c30bf6975e452c0d4ce35ab0984c2fa68c Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-read"> +<refentry xml:id="function.socket-read" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_read</refname> <refpurpose>Lit des données d'un socket</refpurpose> @@ -12,16 +11,15 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <type>string</type><methodname>socket_read</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <type class="union"><type>string</type><type>false</type></type><methodname>socket_read</methodname> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> <methodparam><type>int</type><parameter>length</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>type</parameter><initializer>PHP_BINARY_READ</initializer></methodparam> + <methodparam choice="opt"><type>int</type><parameter>mode</parameter><initializer><constant>PHP_BINARY_READ</constant></initializer></methodparam> </methodsynopsis> <para> - <function>socket_read</function> lit des données dans le socket - <parameter>socket</parameter>, qui doit être une ressource créée par - la fonction <function>socket_create</function> ou la fonction - <function>socket_accept</function>. + <function>socket_read</function> lit des données depuis l'instance de + <classname>Socket</classname> <parameter>socket</parameter>, créée par + <function>socket_create</function> ou <function>socket_accept</function>. </para> </refsect1> @@ -33,9 +31,8 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide, créée par la fonction - <function>socket_create</function> ou la fonction - <function>socket_accept</function>. + Une instance de <classname>Socket</classname> créée par + <function>socket_create</function> ou <function>socket_accept</function>. </para> </listitem> </varlistentry> @@ -44,18 +41,18 @@ <listitem> <para> Elle lit un maximum de <parameter>length</parameter> octets. - Sinon, vous pouvez utiliser <constant>\r</constant>, - <constant>\n</constant> ou <constant>\0</constant> + Sinon, vous pouvez utiliser <constant>\r</constant>, + <constant>\n</constant> ou <constant>\0</constant> pour terminer la lecture (suivant la valeur choisie pour - <parameter>type</parameter>, voir ci-dessous). + <parameter>mode</parameter>, voir ci-dessous). </para> </listitem> </varlistentry> <varlistentry> - <term><parameter>type</parameter></term> + <term><parameter>mode</parameter></term> <listitem> <para> - Le paramètre optionnel <parameter>type</parameter> peut prendre l'une + Le paramètre optionnel <parameter>mode</parameter> peut prendre l'une des valeurs constantes suivantes : <itemizedlist> <listitem> @@ -97,6 +94,23 @@ </note> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> @@ -113,7 +127,6 @@ </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-recv.xml b/reference/sockets/functions/socket-recv.xml index 45a618f43d..4d34dfcbe8 100755 --- a/reference/sockets/functions/socket-recv.xml +++ b/reference/sockets/functions/socket-recv.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 0b26374bc9895dddd5aadc7486f4e4236ef637f9 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-recv"> +<refentry xml:id="function.socket-recv" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_recv</refname> <refpurpose>Reçoit des données d'un socket connecté</refpurpose> @@ -12,24 +11,24 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <type>int</type><methodname>socket_recv</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> - <methodparam><type>string</type><parameter role="reference">buf</parameter></methodparam> - <methodparam><type>int</type><parameter>len</parameter></methodparam> + <type class="union"><type>int</type><type>false</type></type><methodname>socket_recv</methodname> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> + <methodparam><type class="union"><type>string</type><type>null</type></type><parameter role="reference">data</parameter></methodparam> + <methodparam><type>int</type><parameter>length</parameter></methodparam> <methodparam><type>int</type><parameter>flags</parameter></methodparam> </methodsynopsis> <para> La fonction <function>socket_recv</function> reçoit - <parameter>len</parameter> octets de données dans <parameter>buf</parameter> depuis + <parameter>length</parameter> octets de données dans <parameter>data</parameter> depuis <parameter>socket</parameter>. <function>socket_recv</function> peut être utilisée pour récupérer des données depuis des sockets connectés. Aussi, des drapeaux permettent de changer le comportement de la fonction. </para> <para> - <parameter>buf</parameter> est passé par référence, il doit donc être présent + <parameter>data</parameter> est passé par référence, il doit donc être présent dans la liste des arguments. Les données reçues depuis la <parameter>socket</parameter> par <function>socket_recv</function> - seront retournées dans <parameter>buf</parameter>. + seront retournées dans <parameter>data</parameter>. </para> </refsect1> @@ -41,29 +40,29 @@ <term><parameter>socket</parameter></term> <listitem> <para> - <parameter>socket</parameter> doit être une ressource de socket + <parameter>socket</parameter> doit être une instance de <classname>Socket</classname> précédemment créée par socket_create(). </para> </listitem> </varlistentry> <varlistentry> - <term><parameter>buf</parameter></term> + <term><parameter>data</parameter></term> <listitem> <para> Les données reçues seront transmises dans - <parameter>buf</parameter>. Si une erreur survient, si la connexion + <parameter>data</parameter>. Si une erreur survient, si la connexion est fermée ou si aucune donnée n'est disponible, - <parameter>buf</parameter> vaudra alors &null;. + <parameter>data</parameter> vaudra alors &null;. </para> </listitem> </varlistentry> <varlistentry> - <term><parameter>len</parameter></term> + <term><parameter>length</parameter></term> <listitem> <para> - Jusqu'à <parameter>len</parameter> octets seront lus depuis + Jusqu'à <parameter>length</parameter> octets seront lus depuis l'hôte distant. </para> </listitem> @@ -104,8 +103,8 @@ <row> <entry><constant>MSG_WAITALL</constant></entry> <entry> - Bloque avant qu'au moins <parameter>len</parameter> sont reçues. - Cependant, si un signal est intercépté ou si la connexion est + Bloque avant qu'au moins <parameter>length</parameter> sont reçues. + Cependant, si un signal est intercepté ou si la connexion est terminée, la fonction pourra retourner moins de données. </entry> </row> @@ -136,6 +135,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="examples"> &reftitle.examples; <para> @@ -143,7 +159,7 @@ <title>Exemples avec <function>socket_recv</function></title> <para> Cet exemple est une réécriture de l'exemple pris sur - <xref linkend="sockets.examples" /> pour utiliser + <xref linkend="sockets.examples"/> pour utiliser <function>socket_recv</function>. </para> <programlisting role="php"> @@ -227,7 +243,6 @@ OK. </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-recvfrom.xml b/reference/sockets/functions/socket-recvfrom.xml index 9c5c10aab9..839aa906e9 100755 --- a/reference/sockets/functions/socket-recvfrom.xml +++ b/reference/sockets/functions/socket-recvfrom.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 508e255fff6c604c31d5617fe9ddf6d776a3b43d Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-recvfrom"> +<refentry xml:id="function.socket-recvfrom" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_recvfrom</refname> <refpurpose>Reçoit des données d'un socket, connecté ou pas</refpurpose> @@ -12,28 +11,28 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <type>int</type><methodname>socket_recvfrom</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> - <methodparam><type>string</type><parameter role="reference">buf</parameter></methodparam> - <methodparam><type>int</type><parameter>len</parameter></methodparam> + <type class="union"><type>int</type><type>false</type></type><methodname>socket_recvfrom</methodname> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> + <methodparam><type>string</type><parameter role="reference">data</parameter></methodparam> + <methodparam><type>int</type><parameter>length</parameter></methodparam> <methodparam><type>int</type><parameter>flags</parameter></methodparam> - <methodparam><type>string</type><parameter role="reference">name</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter role="reference">port</parameter></methodparam> + <methodparam><type>string</type><parameter role="reference">address</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter role="reference">port</parameter><initializer>&null;</initializer></methodparam> </methodsynopsis> <para> La fonction <function>socket_recvfrom</function> reçoit - <parameter>len</parameter> octets de données du buffer <parameter>buf</parameter> - depuis <parameter>name</parameter> sur le port <parameter>port</parameter> (si le socket + <parameter>length</parameter> octets de données du buffer <parameter>data</parameter> + depuis <parameter>address</parameter> sur le port <parameter>port</parameter> (si le socket n'est pas du type <constant>AF_UNIX</constant>), en utilisant <parameter>socket</parameter>. <function>socket_recvfrom</function> peut être utilisé pour récupérer les données depuis des sockets connectées ou non. De plus, un ou plusieurs drapeaux peuvent être spécifiés pour modifier ce comportement. </para> <para> - Les paramètres <parameter>name</parameter> et <parameter>port</parameter> + Les paramètres <parameter>address</parameter> et <parameter>port</parameter> doivent être passés par référence. Si le socket n'est pas connecté, - <parameter>name</parameter> contiendra l'adresse internet de l'hôte distant ou - le chemin du socket Unix. Si le socket est connecté, <parameter>name</parameter> + <parameter>address</parameter> contiendra l'adresse internet de l'hôte distant ou + le chemin du socket Unix. Si le socket est connecté, <parameter>address</parameter> vaut &null;. De plus, le paramètre <parameter>port</parameter> contiendra le port de l'hôte distant dans le cas d'un socket <constant>AF_INET</constant> ou <constant>AF_INET6</constant>. @@ -49,14 +48,14 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Le paramètre <parameter>socket</parameter> doit être une ressource - de socket créé par la fonction <function>socket_create</function>. + Le paramètre <parameter>socket</parameter> doit être une instance + de <classname>Socket</classname> créé par <function>socket_create</function>. </para> </listitem> </varlistentry> <varlistentry> - <term><parameter>buf</parameter></term> + <term><parameter>data</parameter></term> <listitem> <para> Les données récupérées seront placées dans la variable spécifiée @@ -66,10 +65,10 @@ </varlistentry> <varlistentry> - <term><parameter>len</parameter></term> + <term><parameter>length</parameter></term> <listitem> <para> - Jusqu'à <parameter>len</parameter> octets doivent être récupérés + Jusqu'à <parameter>length</parameter> octets doivent être récupérés de l'hôte distant. </para> </listitem> @@ -109,7 +108,7 @@ <row> <entry><constant>MSG_WAITALL</constant></entry> <entry> - Bloque tant qu'au moins <parameter>len</parameter> octets n'ont pas + Bloque tant qu'au moins <parameter>length</parameter> octets n'ont pas été reçus. Cependant, si un signal est reçu ou l'hôte distant se déconnecte, la fonction pourra retourner moins de données. </entry> @@ -128,12 +127,12 @@ </varlistentry> <varlistentry> - <term><parameter>name</parameter></term> + <term><parameter>address</parameter></term> <listitem> <para> Si le socket est du type <constant>AF_UNIX</constant>, - <parameter>name</parameter> sera le chemin vers ce fichier. Sinon, - pour les sockets non-connectés, <parameter>name</parameter> est l'adresse + <parameter>address</parameter> sera le chemin vers ce fichier. Sinon, + pour les sockets non-connectés, <parameter>address</parameter> est l'adresse IP de l'hôte distant, ou &null; si le socket est connecté. </para> </listitem> @@ -166,6 +165,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="examples"> &reftitle.examples; <para> @@ -207,7 +223,6 @@ echo "Réception de $buf depuis l'adresse distant $from et du port distant $port </para> </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-recvmsg.xml b/reference/sockets/functions/socket-recvmsg.xml index 1069dfea56..1988569e6e 100644 --- a/reference/sockets/functions/socket-recvmsg.xml +++ b/reference/sockets/functions/socket-recvmsg.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 5a3cf6ea6bee7af3b529080aeb18dba8ac1894bd Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-recvmsg"> +<refentry xml:id="function.socket-recvmsg" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_recvmsg</refname> <refpurpose>Lit un message</refpurpose> @@ -11,8 +10,8 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <type>int</type><methodname>socket_recvmsg</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <type class="union"><type>int</type><type>false</type></type><methodname>socket_recvmsg</methodname> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> <methodparam><type>array</type><parameter role="reference">message</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>0</initializer></methodparam> </methodsynopsis> @@ -56,6 +55,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> @@ -67,7 +83,6 @@ </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-select.xml b/reference/sockets/functions/socket-select.xml index b6f60536f1..6918f5eb5f 100755 --- a/reference/sockets/functions/socket-select.xml +++ b/reference/sockets/functions/socket-select.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-select"> +<refentry xml:id="function.socket-select" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_select</refname> <refpurpose>Exécute l'appel système select() sur un tableau de sockets avec une durée d'expiration</refpurpose> @@ -12,18 +11,18 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <type>int</type><methodname>socket_select</methodname> - <methodparam><type>array</type><parameter role="reference">read</parameter></methodparam> - <methodparam><type>array</type><parameter role="reference">write</parameter></methodparam> - <methodparam><type>array</type><parameter role="reference">except</parameter></methodparam> - <methodparam><type>int</type><parameter>tv_sec</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>tv_usec</parameter><initializer>0</initializer></methodparam> + <type class="union"><type>int</type><type>false</type></type><methodname>socket_select</methodname> + <methodparam><type class="union"><type>array</type><type>null</type></type><parameter role="reference">read</parameter></methodparam> + <methodparam><type class="union"><type>array</type><type>null</type></type><parameter role="reference">write</parameter></methodparam> + <methodparam><type class="union"><type>array</type><type>null</type></type><parameter role="reference">except</parameter></methodparam> + <methodparam><type class="union"><type>int</type><type>null</type></type><parameter>seconds</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>microseconds</parameter><initializer>0</initializer></methodparam> </methodsynopsis> <para> <function>socket_select</function> accepte un tableau de sockets et attend qu'elles changent de statut. Ceux qui sont familiers avec les sockets de BSD reconnaîtront dans ces tableaux de sockets les - jeux de pointeurs de fichiers. Trois tableaux indépendants de ressources + jeux de pointeurs de fichiers. Trois tableaux indépendants de sockets sont surveillés. </para> </refsect1> @@ -39,7 +38,7 @@ Les sockets listés dans le paramètre <parameter>read</parameter> seront surveillés en lecture : pour savoir quand ils sont disponibles en lecture (plus précisément, si une lecture - ne va pas bloquer, en particulier, une ressource de socket a déjà + ne va pas bloquer, en particulier, un socket a déjà atteint une fin de fichier, auquel cas <function>socket_read</function> retournera une chaîne de taille zéro). </para> @@ -64,22 +63,22 @@ </listitem> </varlistentry> <varlistentry> - <term><parameter>tv_sec</parameter></term> + <term><parameter>seconds</parameter></term> <listitem> <para> - Les paramètres <parameter>tv_sec</parameter> et <parameter>tv_usec</parameter> + Les paramètres <parameter>seconds</parameter> et <parameter>microseconds</parameter> ensembles forment le paramètre <literal>timeout</literal> (durée de vie). Le <literal>timeout</literal> est la durée maximale de temps avant que <function>socket_select</function> ne se termine. - <parameter>tv_sec</parameter> peut être zéro, ce qui fera que + <parameter>seconds</parameter> peut être zéro, ce qui fera que <function>socket_select</function> retournera immédiatement. C'est très - pratique pour faire du polling (sondage). Si <parameter>tv_sec</parameter> est &null; + pratique pour faire du polling (sondage). Si <parameter>seconds</parameter> est &null; (pas de timeout), <function>socket_select</function> peut se bloquer indéfiniment. </para> </listitem> </varlistentry> <varlistentry> - <term><parameter>tv_usec</parameter></term> + <term><parameter>microseconds</parameter></term> <listitem> <para> </para> @@ -239,7 +238,6 @@ if ($num_changed_sockets === false) { </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-send.xml b/reference/sockets/functions/socket-send.xml index 0b74429ede..f7b67a456a 100755 --- a/reference/sockets/functions/socket-send.xml +++ b/reference/sockets/functions/socket-send.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: e41806c30bf6975e452c0d4ce35ab0984c2fa68c Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-send"> +<refentry xml:id="function.socket-send" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_send</refname> <refpurpose>Envoie des données à un socket connecté</refpurpose> @@ -12,16 +11,16 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <type>int</type><methodname>socket_send</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> - <methodparam><type>string</type><parameter>buf</parameter></methodparam> - <methodparam><type>int</type><parameter>len</parameter></methodparam> + <type class="union"><type>int</type><type>false</type></type><methodname>socket_send</methodname> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> + <methodparam><type>string</type><parameter>data</parameter></methodparam> + <methodparam><type>int</type><parameter>length</parameter></methodparam> <methodparam><type>int</type><parameter>flags</parameter></methodparam> </methodsynopsis> <para> La fonction <function>socket_send</function> envoie - <parameter>len</parameter> octets au socket - <parameter>socket</parameter> depuis le buffer <parameter>buf</parameter>. + <parameter>length</parameter> octets au socket + <parameter>socket</parameter> depuis le buffer <parameter>data</parameter>. </para> </refsect1> @@ -33,14 +32,13 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide, créée par la fonction - <function>socket_create</function> ou la fonction - <function>socket_accept</function>. + Une instance de <classname>Socket</classname> créée par + <function>socket_create</function> ou <function>socket_accept</function>. </para> </listitem> </varlistentry> <varlistentry> - <term><parameter>buf</parameter></term> + <term><parameter>data</parameter></term> <listitem> <para> Un buffer contenant les données qui seront envoyées sur l'hôte distant. @@ -48,11 +46,11 @@ </listitem> </varlistentry> <varlistentry> - <term><parameter>len</parameter></term> + <term><parameter>length</parameter></term> <listitem> <para> Le nombre d'octets qui doivent être envoyés à l'hôte distant - depuis le buffer <parameter>buf</parameter>. + depuis le buffer <parameter>data</parameter>. </para> </listitem> </varlistentry> @@ -111,6 +109,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> @@ -121,7 +136,6 @@ </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-sendmsg.xml b/reference/sockets/functions/socket-sendmsg.xml index 832e527665..c6a9c7543c 100644 --- a/reference/sockets/functions/socket-sendmsg.xml +++ b/reference/sockets/functions/socket-sendmsg.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: b95d28e6ec86e4a71e012737d36ebdc1cf009180 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: no --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-sendmsg"> +<refentry xml:id="function.socket-sendmsg" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_sendmsg</refname> <refpurpose>Envoi un message</refpurpose> @@ -12,7 +11,7 @@ &reftitle.description; <methodsynopsis> <type class="union"><type>int</type><type>false</type></type><methodname>socket_sendmsg</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> <methodparam><type>array</type><parameter>message</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>0</initializer></methodparam> </methodsynopsis> @@ -57,6 +56,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para> @@ -68,7 +84,6 @@ </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-sendto.xml b/reference/sockets/functions/socket-sendto.xml index 0b64969157..d2c9e20c11 100755 --- a/reference/sockets/functions/socket-sendto.xml +++ b/reference/sockets/functions/socket-sendto.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-sendto"> +<refentry xml:id="function.socket-sendto" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_sendto</refname> <refpurpose>Envoie un message à un socket, qu'il soit connecté ou pas</refpurpose> @@ -12,19 +11,19 @@ <refsect1 role="description"> &reftitle.description; <methodsynopsis> - <type>int</type><methodname>socket_sendto</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> - <methodparam><type>string</type><parameter>buf</parameter></methodparam> - <methodparam><type>int</type><parameter>len</parameter></methodparam> + <type class="union"><type>int</type><type>false</type></type><methodname>socket_sendto</methodname> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> + <methodparam><type>string</type><parameter>data</parameter></methodparam> + <methodparam><type>int</type><parameter>length</parameter></methodparam> <methodparam><type>int</type><parameter>flags</parameter></methodparam> - <methodparam><type>string</type><parameter>addr</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>port</parameter><initializer>0</initializer></methodparam> + <methodparam><type>string</type><parameter>address</parameter></methodparam> + <methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>port</parameter><initializer>&null;</initializer></methodparam> </methodsynopsis> <para> - <function>socket_sendto</function> envoie <parameter>len</parameter> - octets issus du buffer <parameter>buf</parameter> via le socket + <function>socket_sendto</function> envoie <parameter>length</parameter> + octets issus du buffer <parameter>data</parameter> via le socket <parameter>socket</parameter>, vers le port <parameter>port</parameter>, - à l'adresse <parameter>addr</parameter>. + à l'adresse <parameter>address</parameter>. </para> </refsect1> @@ -36,25 +35,24 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide, créée par la fonction - <function>socket_create</function>. + Une instance de <classname>Socket</classname> créée par <function>socket_create</function>. </para> </listitem> </varlistentry> <varlistentry> - <term><parameter>buf</parameter></term> + <term><parameter>data</parameter></term> <listitem> <para> Les données à envoyer seront prises depuis le buffer - <parameter>buf</parameter>. + <parameter>data</parameter>. </para> </listitem> </varlistentry> <varlistentry> - <term><parameter>len</parameter></term> + <term><parameter>length</parameter></term> <listitem> <para> - <parameter>len</parameter> octets depuis <parameter>buf</parameter> + <parameter>length</parameter> octets depuis <parameter>data</parameter> doivent être envoyés. </para> </listitem> @@ -103,7 +101,7 @@ </listitem> </varlistentry> <varlistentry> - <term><parameter>addr</parameter></term> + <term><parameter>address</parameter></term> <listitem> <para> L'adresse IP de l'hôte distant. @@ -131,6 +129,28 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + <row> + <entry>8.0.0</entry> + <entry> + <parameter>port</parameter> est désormais nullable. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </refsect1> <refsect1 role="examples"> &reftitle.examples; @@ -164,7 +184,6 @@ socket_close($sock); </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-set-block.xml b/reference/sockets/functions/socket-set-block.xml index 9f6d109e09..74bce9b6e9 100644 --- a/reference/sockets/functions/socket-set-block.xml +++ b/reference/sockets/functions/socket-set-block.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-set-block"> +<refentry xml:id="function.socket-set-block" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_set_block</refname> <refpurpose>Met le socket en mode bloquant</refpurpose> @@ -13,7 +12,7 @@ &reftitle.description; <methodsynopsis> <type>bool</type><methodname>socket_set_block</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> </methodsynopsis> <para> <function>socket_set_block</function> supprime l'option @@ -36,9 +35,8 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide, créée par la fonction - <function>socket_create</function> ou la fonction - <function>socket_accept</function>. + Une instance de <classname>Socket</classname> créée par + <function>socket_create</function> ou <function>socket_accept</function>. </para> </listitem> </varlistentry> @@ -53,6 +51,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="examples"> &reftitle.examples; <para> @@ -89,7 +104,6 @@ socket_accept($socket); </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-set-nonblock.xml b/reference/sockets/functions/socket-set-nonblock.xml index 1f1bb63e0c..9dabcf8813 100755 --- a/reference/sockets/functions/socket-set-nonblock.xml +++ b/reference/sockets/functions/socket-set-nonblock.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 8c9e28bc675036915ccd7e7069aa755d0d51b950 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-set-nonblock"> +<refentry xml:id="function.socket-set-nonblock" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_set_nonblock</refname> <refpurpose>Sélectionne le mode non bloquant d'un pointeur de fichier</refpurpose> @@ -13,7 +12,7 @@ &reftitle.description; <methodsynopsis> <type>bool</type><methodname>socket_set_nonblock</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> </methodsynopsis> <para> La fonction <function>socket_set_nonblock</function> configure l'option @@ -36,9 +35,8 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide, créée par la fonction - <function>socket_create</function> ou la fonction - <function>socket_accept</function>. + Une instance de <classname>Socket</classname> créée par + <function>socket_create</function> ou <function>socket_accept</function>. </para> </listitem> </varlistentry> @@ -53,6 +51,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="examples"> &reftitle.examples; <para> @@ -90,7 +105,6 @@ socket_accept($socket); </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-set-option.xml b/reference/sockets/functions/socket-set-option.xml index 490dd888c2..eaec663983 100755 --- a/reference/sockets/functions/socket-set-option.xml +++ b/reference/sockets/functions/socket-set-option.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 0a58f121e638b8c8606053cb9586b356bb414238 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-set-option"> +<refentry xml:id="function.socket-set-option" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_set_option</refname> <refpurpose>Modifie les options de socket</refpurpose> @@ -13,16 +12,16 @@ &reftitle.description; <methodsynopsis> <type>bool</type><methodname>socket_set_option</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> <methodparam><type>int</type><parameter>level</parameter></methodparam> - <methodparam><type>int</type><parameter>optname</parameter></methodparam> - <methodparam><type>mixed</type><parameter>optval</parameter></methodparam> + <methodparam><type>int</type><parameter>option</parameter></methodparam> + <methodparam><type class="union"><type>array</type><type>string</type><type>int</type></type><parameter>value</parameter></methodparam> </methodsynopsis> <para> <function>socket_set_option</function> configure l'option spécifiée par - <parameter>optname</parameter>, au niveau de protocole + <parameter>option</parameter>, au niveau de protocole <parameter>level</parameter> à la valeur pointée par - <parameter>optval</parameter> pour le socket spécifié par + <parameter>value</parameter> pour le socket spécifié par <parameter>socket</parameter>. </para> </refsect1> @@ -35,9 +34,8 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide, créée par la fonction - <function>socket_create</function> ou la fonction - <function>socket_accept</function>. + Une instance de <classname>Socket</classname> créée par + <function>socket_create</function> ou <function>socket_accept</function>. </para> </listitem> </varlistentry> @@ -56,7 +54,7 @@ </listitem> </varlistentry> <varlistentry> - <term><parameter>optname</parameter></term> + <term><parameter>option</parameter></term> <listitem> <para> Les options disponibles sont les mêmes que pour @@ -65,7 +63,7 @@ </listitem> </varlistentry> <varlistentry> - <term><parameter>optval</parameter></term> + <term><parameter>value</parameter></term> <listitem> <para> La valeur de l'option. @@ -83,6 +81,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="examples"> &reftitle.examples; <para> @@ -133,7 +148,6 @@ if ($rval === false) { </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-shutdown.xml b/reference/sockets/functions/socket-shutdown.xml index 452aea28de..2ac55c7b15 100755 --- a/reference/sockets/functions/socket-shutdown.xml +++ b/reference/sockets/functions/socket-shutdown.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 77386c9ed685b4dac0ade2184b2d4e5d9dc54868 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-shutdown"> +<refentry xml:id="function.socket-shutdown" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_shutdown</refname> <refpurpose>Éteint un socket en lecture et/ou écriture</refpurpose> @@ -13,8 +12,8 @@ &reftitle.description; <methodsynopsis> <type>bool</type><methodname>socket_shutdown</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>how</parameter><initializer>2</initializer></methodparam> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>mode</parameter><initializer>2</initializer></methodparam> </methodsynopsis> <para> <function>socket_shutdown</function> vous permet d'empêcher les données @@ -23,7 +22,7 @@ </para> <note> <para> - Le ou les buffers associés peuvent, ou peuvent ne pas etre vidés. + Le ou les buffers associés peuvent, ou peuvent ne pas être vidés. </para> </note> </refsect1> @@ -36,19 +35,18 @@ <term><parameter>socket</parameter></term> <listitem> <para> - Une ressource de socket valide, créée par la fonction - <function>socket_create</function>. + Une instance de <classname>Socket</classname> créée par <function>socket_create</function>. </para> </listitem> </varlistentry> <varlistentry> - <term><parameter>how</parameter></term> + <term><parameter>mode</parameter></term> <listitem> <para> - La valeur du paramètre <parameter>how</parameter> peut être une + La valeur du paramètre <parameter>mode</parameter> peut être une des valeurs suivantes : <table> - <title>Valeurs possibles pour <parameter>how</parameter></title> + <title>Valeurs possibles pour <parameter>mode</parameter></title> <tgroup cols="2"> <tbody> <row> @@ -86,8 +84,23 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + </tbody> + </tgroup> + </informaltable> + </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-strerror.xml b/reference/sockets/functions/socket-strerror.xml index fad5227aa0..c737c234df 100755 --- a/reference/sockets/functions/socket-strerror.xml +++ b/reference/sockets/functions/socket-strerror.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-strerror"> +<refentry xml:id="function.socket-strerror" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_strerror</refname> <refpurpose>Retourne une chaîne décrivant un message d'erreur</refpurpose> @@ -13,11 +12,11 @@ &reftitle.description; <methodsynopsis> <type>string</type><methodname>socket_strerror</methodname> - <methodparam><type>int</type><parameter>errno</parameter></methodparam> + <methodparam><type>int</type><parameter>error_code</parameter></methodparam> </methodsynopsis> <para> <function>socket_strerror</function> prend un code d'erreur comme paramètre - <parameter>errno</parameter>. Cette valeur est souvent retournée par la + <parameter>error_code</parameter>. Cette valeur est souvent retournée par la fonction <function>socket_last_error</function>. La fonction retourne le message d'erreur correspondant. </para> @@ -35,7 +34,7 @@ <para> <variablelist> <varlistentry> - <term><parameter>errno</parameter></term> + <term><parameter>error_code</parameter></term> <listitem> <para> Une numéro d'erreur de socket valide, comme produit par la fonction @@ -51,7 +50,7 @@ &reftitle.returnvalues; <para> Retourne le message d'erreur associé avec le paramètre - <parameter>errno</parameter>. + <parameter>error_code</parameter>. </para> </refsect1> @@ -100,7 +99,6 @@ socket_bind() a échoué : raison : Permission denied </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/functions/socket-write.xml b/reference/sockets/functions/socket-write.xml index fa188ff901..036f8a3e72 100755 --- a/reference/sockets/functions/socket-write.xml +++ b/reference/sockets/functions/socket-write.xml @@ -1,9 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: b95d28e6ec86e4a71e012737d36ebdc1cf009180 Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> - -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-write"> +<refentry xml:id="function.socket-write" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>socket_write</refname> <refpurpose>Écrit dans un socket</refpurpose> @@ -13,14 +12,14 @@ &reftitle.description; <methodsynopsis> <type class="union"><type>int</type><type>false</type></type><methodname>socket_write</methodname> - <methodparam><type>resource</type><parameter>socket</parameter></methodparam> - <methodparam><type>string</type><parameter>buffer</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>length</parameter><initializer>0</initializer></methodparam> + <methodparam><type>Socket</type><parameter>socket</parameter></methodparam> + <methodparam><type>string</type><parameter>data</parameter></methodparam> + <methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>length</parameter><initializer>&null;</initializer></methodparam> </methodsynopsis> <para> <function>socket_write</function> écrit dans le socket <parameter>socket</parameter> les données du buffer - <parameter>buffer</parameter>. + <parameter>data</parameter>. </para> </refsect1> @@ -36,7 +35,7 @@ </listitem> </varlistentry> <varlistentry> - <term><parameter>buffer</parameter></term> + <term><parameter>data</parameter></term> <listitem> <para> Le buffer à écrire. @@ -79,6 +78,29 @@ </note> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + &sockets.changelog.socket-param; + <row> + <entry>8.0.0</entry> + <entry> + <parameter>length</parameter> est désormais nullable. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; <note> @@ -108,7 +130,6 @@ </refsect1> </refentry> - <!-- Keep this comment at the end of the file Local variables: mode: sgml diff --git a/reference/sockets/setup.xml b/reference/sockets/setup.xml index 7cddb581b8..8c7c312c1c 100644 --- a/reference/sockets/setup.xml +++ b/reference/sockets/setup.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 323eb8f48d7333301a5b01559508e4d7dd15cbea Maintainer: yannick Status: ready --> +<!-- EN-Revision: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> <chapter xml:id="sockets.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> @@ -28,13 +28,15 @@ <section xml:id="sockets.resources"> &reftitle.resources; <para> + Antérieur à PHP 8.0.0, <function>socket_accept</function>, <function>socket_import_stream</function>, <function>socket_addrinfo_connect</function>, <function>socket_addrinfo_bind</function>, <function>socket_create_listen</function>, <function>socket_wsaprotocol_info_import</function> et - <function>socket_create</function> retournent des ressources sur les sockets. + <function>socket_create</function> retournaient des ressources Socket. </para> <para> - <function>socket_addrinfo_lookup</function> retourne un tableau de ressources AddressInfo. + Antérieur à PHP 8.0.0, + <function>socket_addrinfo_lookup</function> retournait un tableau de ressources AddressInfo. </para> </section> <!-- }}} -->