cvs: phpdoc-fr /reference/sockets reference.xml /reference/sockets/functions socket-accept.xml socket-bind.xml socket-clear-error.xml
socket-close.xml socket-connect.xml socket-create-listen.xml socket-create-pair.xml socket-create.xml socket-get-option.xml socket-getpeername.xml
socket-getsockname.xml socket-iovec-add.xml socket-iovec-alloc.xml socket-iovec-delete.xml socket-iovec-fetch.xml socket-iovec-free.xml
socket-iovec-set.xml socket-last-error.xml socket-listen.xml socket-read.xml socket-readv.xml socket-recv.xml socket-recvfrom.xml socket-recvmsg.xml
socket-select.xml socket-send.xml socket-sendmsg.xml socket-sendto.xml socket-set-nonblock.xml socket-set-option.xml socket-shutdown.xml
socket-strerror.xml socket-write.xml socket-writev.xml
| From: | Damien Seguy | Date: | Wed, 11 Jun 2003 14:08:52 +0000 |
| Subject: | cvs: phpdoc-fr /reference/sockets reference.xml /reference/sockets/functions socket-accept.xml socket-bind.xml socket-clear-error.xml socket-close.xml socket-connect.xml socket-create-listen.xml socket-create-pair.xml socket-create.xml socket-get-option.xml socket-getpeername.xml socket-getsockname.xml socket-iovec-add.xml socket-iovec-alloc.xml socket-iovec-delete.xml socket-iovec-fetch.xml socket-iovec-free.xml socket-iovec-set.xml socket-last-error.xml socket-listen.xml socket-read.xml socket-readv.xml socket-recv.xml socket-recvfrom.xml socket-recvmsg.xml socket-select.xml socket-send.xml socket-sendmsg.xml socket-sendto.xml socket-set-nonblock.xml socket-set-option.xml socket-shutdown.xml socket-strerror.xml socket-write.xml socket-writev.xml |
||
| Groups: | php.doc.fr | ||
| Request: | Send a blank email to doc-fr+get-488@lists.php.net to get a copy of this message | ||
dams Wed Jun 11 10:08:52 2003 EDT
Modified files:
/phpdoc-fr/reference/sockets reference.xml
/phpdoc-fr/reference/sockets/functions socket-accept.xml
socket-bind.xml
socket-clear-error.xml
socket-close.xml
socket-connect.xml
socket-create-listen.xml
socket-create-pair.xml
socket-create.xml
socket-get-option.xml
socket-getpeername.xml
socket-getsockname.xml
socket-iovec-add.xml
socket-iovec-alloc.xml
socket-iovec-delete.xml
socket-iovec-fetch.xml
socket-iovec-free.xml
socket-iovec-set.xml
socket-last-error.xml
socket-listen.xml
socket-read.xml
socket-readv.xml
socket-recv.xml
socket-recvfrom.xml
socket-recvmsg.xml
socket-select.xml
socket-send.xml
socket-sendmsg.xml
socket-sendto.xml
socket-set-nonblock.xml
socket-set-option.xml
socket-shutdown.xml
socket-strerror.xml
socket-write.xml
socket-writev.xml
Log:
correcting new lines
Index: phpdoc-fr/reference/sockets/reference.xml diff -u phpdoc-fr/reference/sockets/reference.xml:1.5 phpdoc-fr/reference/sockets/reference.xml:1.6 --- phpdoc-fr/reference/sockets/reference.xml:1.5 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/reference.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,254 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.5 $ --> <reference id="ref.sockets"> <title>Socket</title> <titleabbrev>Sockets</titleabbrev> <partintro> <section id="sockets.intro"> &reftitle.intro; <simpara> L'extension socket implémente une interface bas niveau avec les fonctions de communication par socket, basées sur les sockets BSD si populaires, et fournit la possibilité de fonctionner aussi bien sous forme de client que de serveur. </simpara> <para> Pour une interface socket cliente plus générique, voyez <function>fsockopen</function> et <function>pfsockopen</function>. </para> <para> Lorsque vous utilisez ces fonctions, il est important de vous rappeler que si de nombreuses fonctions ont le même nom que leur alter ego en langage C, elles ont souvent des déclarations différentes. Lisez attentivement les descriptions pour éviter des confusions. </para> <para> Cela dit, ceux qui ne sont pas familiers avec la programmation par socket peuvent toujours trouver beaucoup de documentation dans les pages de manuel Unix appropriées, et il y a une grande quantité d'introductions en langage C sur le web, qui peuvent être facilement réutilisés, avec des adaptations mineures. <ulink url="&url.socket.faq;">UNIX Socket FAQ</ulink> est un bon début. </para> &warn.experimental; </section> <section id="sockets.requirements"> &reftitle.required; &no.requirement; </section> &reference.sockets.configure; <section id="sockets.configuration"> &reftitle.runtime; &no.config; </section> <section id="sockets.resources"> &reftitle.resources; &no.resource; </section> &reference.sockets.constants; <section id="sockets.errors"> <title>Socket Errors</title> <para> L'extension socket a été écrite pour fournir une interface utilisable avec les puissantes sockets fournies par BSD. Un soin particulier a été apporté pour que les fonctions soient aussi efficaces sous Unix que sous Windows32. Presque toutes les fonctions de sockets peuvent échouer dans certaines circonstances, et émettent ainsi un message d'alerte <constant>E_WARNING</constant> décrivant l'erreur. Parfois, cela ne se fait pas selon les souhaits du développeur. Par exemple, la fonction <function>socket_read</function> peut tout à coup émettre un message <constant>E_WARNING</constant> car la connexion a été inopinément interrompu. Il est commun de supprimer les erreurs avec l'opérateur <literal>@</literal> et de traiter les erreurs avec la fonction <function>socket_last_error</function>, au niveau application. Vous pouvez appeler <function>socket_strerror</function> avec le code d'erreur pour connaître le message d'erreur, humainement lisible. Reportez vous à leur description pour plus de détails. </para> <note> <para> Les messages <constant>E_WARNING</constant> généré par l'extension socket sont en anglais, mais le message d'erreur s'affichera en fonction de la configuration locale (<constant>LC_MESSAGES</constant>): <programlisting role="php"><![CDATA[Warning - socket_bind() unable to bind address [98]: Die Adresse wird bereits verwendet]]> </programlisting> </para> </note> </section> <section id="sockets.examples"> &reftitle.examples; <para> <example> <title>Exemple de socket : serveur TCP/IP simple</title> <para> Cet exemple montre comment créer un serveur simple. Changez les variables <varname>address</varname> et <varname>port</varname> pour vous adapter à votre configuration, et exécutez le. Vous pourrez alors vous connecter au serveur avec une commande comme ceci : <command>telnet 192.168.1.53 10000</command> (en supposant que l'adresse et le port correspondent à votre configuration). Tout ce que vous saisissez après cela sera envoyé au serveur, et affiché en retour. Pour vous déconnecter, tapez 'quit'. <programlisting role="php"><![CDATA[#!/usr/local/bin/php -q<?phperror_reporting (E_ALL);/* Autorise l'éxécution infinie du script, en attente de connexion. */set_time_limit (0);/* Active le vidage implicite des buffers de sortie, pour que nous * puissions vois ce que nous lisons au fur et a mesure. */ob_implicit_flush ();$address = '192.168.1.53';$port = 10000;if (($sock = socket_create (AF_INET, SOCK_STREAM, 0)) < 0) { echo "socket_create() a échoué : raison : " . socket_strerror ($sock) . "\n";}if (($ret = socket_bind ($sock, $address, $port)) < 0) { echo "socket_bind() a échoué : raison : " . socket_strerror ($ret) . "\n";}if (($ret = socket_listen ($sock, 5)) < 0) { echo "socket_listen() a échoué : raison : " . socket_strerror ($ret) . "\n";}do { if (($msgsock = socket_accept($sock)) < 0) { echo "socket_accept() a échoué : raison : " . socket_strerror ($msgsock) . "\n"; break; } /* Send instructions. */ $msg = "\Bienvenue sur le serveur de test PHP.\n" . "Pour quitter, tapez 'quit'. Pour éteindre le serveur, tapez 'shutdown'.\n"; socket_write($msgsock, $msg, strlen($msg)); do { if (FALSE === ($buf = socket_read ($msgsock, 2048))) { echo "socket_read() a échoué : raison : " . socket_strerror ($ret) . "\n"; break 2; } if (!$buf = trim ($buf)) { continue; } if ($buf == 'quit') { break; } if ($buf == 'shutdown') { socket_close ($msgsock); break 2; } $talkback = "PHP: You said '$buf'.\n"; socket_write ($msgsock, $talkback, strlen ($talkback)); echo "$buf\n"; } while (true); socket_close ($msgsock);} while (true);socket_close ($sock);?>]]> </programlisting> </para> </example> </para> <para> <example> <title>Exemple avec les sockets : Client TCP/IP simple</title> <para> Ce exemple illustre un client HTTP simple. Il se connecte simplement à une page, envoie une requête HEAD, affiche le résultat, et se termine. </para> <programlisting><![CDATA[<?phperror_reporting (E_ALL);echo "<h2>Connexion TCP/IP</h2>\n";/* Lit le port du service WWW. */$service_port = getservbyname ('www', 'tcp');/* Lit l'adresse IP du serveur de destination */$address = gethostbyname ('www.exemple.com');/* Cree une socket TCP/IP. */$socket = socket_create (AF_INET, SOCK_STREAM, 0);if ($socket < 0) { echo "socket_create() a échoué : raison : " . socket_strerror ($socket) . "\n";} else { echo "OK.\n";}echo "Essai de connexion à '$address' sur le port '$service_port'...";$result = socket_connect ($socket, $address, $service_port);if ($result < 0) { echo "socket_connect() a échoué : raison : ($result) " . socket_strerror($result) . "\n";} else { echo "OK.\n";}$in = "HEAD / HTTP/1.0\r\n\r\n";$out = '';echo "Envoi de la requête HTTP HEAD...";socket_write ($socket, $in, strlen ($in));echo "OK.\n";echo "Lire la réponse : \n\n";while ($out = socket_read ($socket, 2048)) { echo $out;}echo "Fermeture de la socket...";socket_close ($socket);echo "OK.\n\n";?>]]> </programlisting> </example> </para> </section> </partintro>&reference.sockets.functions; </reference><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.6 $ --> + <reference id="ref.sockets"> + <title>Socket</title> + <titleabbrev>Sockets</titleabbrev> + + <partintro> + <section id="sockets.intro"> + &reftitle.intro; + <simpara> + L'extension socket implémente une interface bas niveau avec les fonctions + de communication par socket, basées sur les sockets BSD si populaires, + et fournit la possibilité de fonctionner aussi bien sous forme de client + que de serveur. + </simpara> + <para> + Pour une interface socket cliente plus générique, voyez + <function>fsockopen</function> et <function>pfsockopen</function>. + </para> + <para> + Lorsque vous utilisez ces fonctions, il est important de vous + rappeler que si de nombreuses fonctions ont le même nom que leur + alter ego en langage C, elles ont souvent des déclarations différentes. + Lisez attentivement les descriptions pour éviter des confusions. + </para> + <para> + Cela dit, ceux qui ne sont pas familiers avec la programmation par socket + peuvent toujours trouver beaucoup de documentation dans les pages de + manuel Unix appropriées, et il y a une grande quantité d'introductions + en langage C sur le web, qui peuvent être facilement réutilisés, avec + des adaptations mineures. + <ulink url="&url.socket.faq;">UNIX Socket FAQ</ulink> + est un bon début. + </para> + &warn.experimental; + </section> + + <section id="sockets.requirements"> + &reftitle.required; + &no.requirement; + </section> + + &reference.sockets.configure; + + <section id="sockets.configuration"> + &reftitle.runtime; + &no.config; + </section> + + <section id="sockets.resources"> + &reftitle.resources; + &no.resource; + </section> + + &reference.sockets.constants; + + <section id="sockets.errors"> + <title>Socket Errors</title> + <para> + L'extension socket a été écrite pour fournir une interface utilisable + avec les puissantes sockets fournies par BSD. Un soin particulier a été + apporté pour que les fonctions soient aussi efficaces sous Unix que sous + Windows32. Presque toutes les fonctions de sockets peuvent échouer + dans certaines circonstances, et émettent ainsi un message d'alerte + <constant>E_WARNING</constant> décrivant l'erreur. Parfois, cela ne + se fait pas selon les souhaits du développeur. Par exemple, la fonction + <function>socket_read</function> peut tout à coup émettre un + message <constant>E_WARNING</constant> car la connexion a été + inopinément interrompu. Il est commun de supprimer les erreurs avec + l'opérateur <literal>@</literal> et de traiter les erreurs avec la + fonction <function>socket_last_error</function>, au niveau application. + Vous pouvez appeler <function>socket_strerror</function> avec le code + d'erreur pour connaître le message d'erreur, humainement lisible. + Reportez vous à leur description pour plus de détails. + </para> + <note> + <para> + Les messages <constant>E_WARNING</constant> généré par l'extension + socket sont en anglais, mais le message d'erreur s'affichera en fonction + de la configuration locale (<constant>LC_MESSAGES</constant>): + <programlisting role="php"> +<![CDATA[ +Warning - socket_bind() unable to bind address [98]: Die Adresse wird bereits verwendet +]]> + </programlisting> + </para> + </note> + </section> + + <section id="sockets.examples"> + &reftitle.examples; + <para> + <example> + <title>Exemple de socket : serveur TCP/IP simple</title> + <para> + Cet exemple montre comment créer un serveur simple. + Changez les variables <varname>address</varname> et + <varname>port</varname> pour vous adapter à votre configuration, + et exécutez le. Vous pourrez alors vous connecter au serveur + avec une commande comme ceci : <command>telnet 192.168.1.53 + 10000</command> (en supposant que l'adresse et le port correspondent + à votre configuration). Tout ce que vous saisissez après cela sera + envoyé au serveur, et affiché en retour. Pour vous déconnecter, + tapez 'quit'. + <programlisting role="php"> +<![CDATA[ +#!/usr/local/bin/php -q +<?php +error_reporting (E_ALL); + +/* Autorise l'éxécution infinie du script, en attente de connexion. */ +set_time_limit (0); + +/* Active le vidage implicite des buffers de sortie, pour que nous + * puissions vois ce que nous lisons au fur et a mesure. */ +ob_implicit_flush (); + +$address = '192.168.1.53'; +$port = 10000; + +if (($sock = socket_create (AF_INET, SOCK_STREAM, 0)) < 0) { + echo "socket_create() a échoué : raison : " . socket_strerror ($sock) . "\n"; +} + +if (($ret = socket_bind ($sock, $address, $port)) < 0) { + echo "socket_bind() a échoué : raison : " . socket_strerror ($ret) . "\n"; +} + +if (($ret = socket_listen ($sock, 5)) < 0) { + echo "socket_listen() a échoué : raison : " . socket_strerror ($ret) . "\n"; +} + +do { + if (($msgsock = socket_accept($sock)) < 0) { + echo "socket_accept() a échoué : raison : " . socket_strerror ($msgsock) . "\n"; + break; + } + /* Send instructions. */ + $msg = "\Bienvenue sur le serveur de test PHP.\n" . + "Pour quitter, tapez 'quit'. Pour éteindre le serveur, tapez 'shutdown'.\n"; + socket_write($msgsock, $msg, strlen($msg)); + + do { + if (FALSE === ($buf = socket_read ($msgsock, 2048))) { + echo "socket_read() a échoué : raison : " . socket_strerror ($ret) . "\n"; + break 2; + } + if (!$buf = trim ($buf)) { + continue; + } + if ($buf == 'quit') { + break; + } + if ($buf == 'shutdown') { + socket_close ($msgsock); + break 2; + } + $talkback = "PHP: You said '$buf'.\n"; + socket_write ($msgsock, $talkback, strlen ($talkback)); + echo "$buf\n"; + } while (true); + socket_close ($msgsock); +} while (true); + +socket_close ($sock); +?> +]]> + </programlisting> + </para> + </example> + </para> + <para> + <example> + <title>Exemple avec les sockets : Client TCP/IP simple</title> + <para> + Ce exemple illustre un client HTTP simple. Il se connecte simplement + à une page, envoie une requête HEAD, affiche le résultat, et se termine. + </para> + <programlisting> +<![CDATA[ +<?php +error_reporting (E_ALL); + +echo "<h2>Connexion TCP/IP</h2>\n"; + +/* Lit le port du service WWW. */ +$service_port = getservbyname ('www', 'tcp'); + +/* Lit l'adresse IP du serveur de destination */ +$address = gethostbyname ('www.exemple.com'); + +/* Cree une socket TCP/IP. */ +$socket = socket_create (AF_INET, SOCK_STREAM, 0); +if ($socket < 0) { + echo "socket_create() a échoué : raison : " . socket_strerror ($socket) . "\n"; +} else { + echo "OK.\n"; +} + +echo "Essai de connexion à '$address' sur le port '$service_port'..."; +$result = socket_connect ($socket, $address, $service_port); +if ($result < 0) { + echo "socket_connect() a échoué : raison : ($result) " . socket_strerror($result) . "\n"; +} else { + echo "OK.\n"; +} + +$in = "HEAD / HTTP/1.0\r\n\r\n"; +$out = ''; + +echo "Envoi de la requête HTTP HEAD..."; +socket_write ($socket, $in, strlen ($in)); +echo "OK.\n"; + +echo "Lire la réponse : \n\n"; +while ($out = socket_read ($socket, 2048)) { + echo $out; +} + +echo "Fermeture de la socket..."; +socket_close ($socket); +echo "OK.\n\n"; +?> +]]> + </programlisting> + </example> + </para> + </section> + </partintro> + +&reference.sockets.functions; + + </reference> +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> + Index: phpdoc-fr/reference/sockets/functions/socket-accept.xml diff -u phpdoc-fr/reference/sockets/functions/socket-accept.xml:1.2 phpdoc-fr/reference/sockets/functions/socket-accept.xml:1.3 --- phpdoc-fr/reference/sockets/functions/socket-accept.xml:1.2 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-accept.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,78 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.3 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.1 --> <refentry id="function.socket-accept"> <refnamediv> <refname>socket_accept</refname> <refpurpose>Accepte une connexion sur une socket</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>resource</type><methodname>socket_accept</methodname> <methodparam><type>resource</type><parameter>socket</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> Une fois que la socket <parameter>socket</parameter> a été créée avec la fonction <function>socket_create</function>, liée à un nom avec la fonction <function>socket_bind</function>, et mise en attente de connexion avec la fonction <function>socket_listen</function>, <function>socket_accept</function> va accepter les connexions sur cette socket. Une fois qu'une connexion est faite, une nouvelle ressource de socket est retournée. Elle peut etre 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 <parameter>socket</parameter> a été rendue non-bloquante, grâce à <function>socket_set_blocking</function> ou <function>socket_set_nonblock</function>, &false; sera retourné. </para> <para> La ressource de socket retournée par <function>socket_accept</function> ne doit pas être utilisée pour accepter de nouvelles connexions. La socket originale <parameter>socket</parameter>, qui est en attente, reste ouverte et peut être réutilisée. </para> <para> <function>socket_listen</function> retourne une nouvelle ressource de socket 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 d'erreur, humainement lisible. </para> <para> Voir aussi <function>socket_bind</function>, <function>socket_connect</function>, <function>socket_listen</function>, <function>socket_create</function> et <function>socket_strerror</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.3 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.1 --> + <refentry id="function.socket-accept"> + <refnamediv> + <refname>socket_accept</refname> + <refpurpose>Accepte une connexion sur une socket</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>resource</type><methodname>socket_accept</methodname> + <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + Une fois que la socket <parameter>socket</parameter> a été créée + avec la fonction <function>socket_create</function>, liée à + un nom avec la fonction <function>socket_bind</function>, et + mise en attente de connexion avec la fonction + <function>socket_listen</function>, <function>socket_accept</function> + va accepter les connexions sur cette socket. Une fois qu'une + connexion est faite, une nouvelle ressource de socket est + retournée. Elle peut etre 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 <parameter>socket</parameter> + a été rendue non-bloquante, grâce à + <function>socket_set_blocking</function> ou + <function>socket_set_nonblock</function>, &false; sera retourné. + </para> + <para> + La ressource de socket retournée par + <function>socket_accept</function> ne doit pas être utilisée + pour accepter de nouvelles connexions. La socket originale + <parameter>socket</parameter>, qui est en attente, reste ouverte + et peut être réutilisée. + </para> + <para> + <function>socket_listen</function> retourne une nouvelle ressource + de socket 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 d'erreur, humainement lisible. + </para> + <para> + Voir aussi + <function>socket_bind</function>, + <function>socket_connect</function>, + <function>socket_listen</function>, + <function>socket_create</function> et + <function>socket_strerror</function>. + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-bind.xml diff -u phpdoc-fr/reference/sockets/functions/socket-bind.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-bind.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-bind.xml:1.3 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/functions/socket-bind.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,74 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.4 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.3 --> <refentry id="function.socket-bind"> <refnamediv> <refname>socket_bind</refname> <refpurpose>Lie un nom à une socket</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_bind</methodname> <methodparam><type>resource</type><parameter>socket</parameter></methodparam> <methodparam><type>string</type><parameter>address</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>port</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> <function>socket_bind</function> lie le nom donné par <parameter>address</parameter> à la socket décrite par <parameter>socket</parameter>, qui doit être une ressource de socket valide, créée par <function>socket_create</function>. </para> <para> Le paramètre d'adresse <parameter>address</parameter> peut être soit une adresse IP numérique (i.e. <literal>127.0.0.1</literal>), si la socket est de la famille <constant>AF_INET</constant>; ou bien le chemin d'une socket de domaine Unix, si la socket est de la famille <constant>AF_UNIX</constant>. </para> <para> Le paramètre <parameter>port</parameter> n'est utilisé que lors de la connexion à une socket de type <constant>AF_INET</constant>, et désigne le port sur l'hôte distant, sur lequel une connexion doit être faite. </para> <para> &return.success; 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> <para> Voir aussi <function>socket_connect</function>, <function>socket_listen</function>, <function>socket_create</function>, <function>socket_last_error</function> et <function>socket_strerror</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.4 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.3 --> + <refentry id="function.socket-bind"> + <refnamediv> + <refname>socket_bind</refname> + <refpurpose>Lie un nom à une socket</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_bind</methodname> + <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>string</type><parameter>address</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>port</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + <function>socket_bind</function> lie le nom donné par + <parameter>address</parameter> à la socket décrite par + <parameter>socket</parameter>, qui doit être une ressource + de socket valide, créée par <function>socket_create</function>. + </para> + <para> + Le paramètre d'adresse <parameter>address</parameter> peut + être soit une adresse IP numérique (i.e. <literal>127.0.0.1</literal>), + si la socket est de la famille <constant>AF_INET</constant>; + ou bien le chemin d'une socket de domaine Unix, si la socket + est de la famille <constant>AF_UNIX</constant>. + </para> + <para> + Le paramètre <parameter>port</parameter> n'est utilisé que lors + de la connexion à une socket de type <constant>AF_INET</constant>, + et désigne le port sur l'hôte distant, sur lequel une connexion + doit être faite. + </para> + <para> + &return.success; 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> + <para> + Voir aussi + <function>socket_connect</function>, + <function>socket_listen</function>, + <function>socket_create</function>, + <function>socket_last_error</function> et + <function>socket_strerror</function>. + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-clear-error.xml diff -u phpdoc-fr/reference/sockets/functions/socket-clear-error.xml:1.2 phpdoc-fr/reference/sockets/functions/socket-clear-error.xml:1.3 --- phpdoc-fr/reference/sockets/functions/socket-clear-error.xml:1.2 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-clear-error.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,53 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.4 $ --> <refentry id="function.socket-clear-error"> <refnamediv> <refname>socket_clear_error</refname> <refpurpose>Efface toutes les erreurs précédemment générées par une socket</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>void</type><methodname>socket_clear_error</methodname> <methodparam choice="opt"><type>resource</type><parameter>socket</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> <function>socket_clear_error</function> efface tous les codes d'erreurs qui ont été enregistrés pour la socket <parameter>socket</parameter>, ou bien pour la socket générale. </para> <para> <function>socket_clear_error</function> permet de remettre à zéro les codes d'erreurs d'une socket ou de la socket globale. Cela peut être utile pour détecter l'avénement d'une erreur durant une partie de l'applcation. </para> <para> Voir aussi <function>socket_last_error</function> et <function>socket_strerror</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.4 $ --> + <refentry id="function.socket-clear-error"> + <refnamediv> + <refname>socket_clear_error</refname> + <refpurpose>Efface toutes les erreurs précédemment générées par une socket</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>void</type><methodname>socket_clear_error</methodname> + <methodparam choice="opt"><type>resource</type><parameter>socket</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + <function>socket_clear_error</function> efface tous les codes d'erreurs + qui ont été enregistrés pour la socket <parameter>socket</parameter>, + ou bien pour la socket générale. + </para> + <para> + <function>socket_clear_error</function> permet de remettre à zéro les + codes d'erreurs d'une socket ou de la socket globale. Cela peut être + utile pour détecter l'avénement d'une erreur durant une partie de + l'applcation. + </para> + <para> + Voir aussi + <function>socket_last_error</function> et + <function>socket_strerror</function>. + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-close.xml diff -u phpdoc-fr/reference/sockets/functions/socket-close.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-close.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-close.xml:1.3 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/functions/socket-close.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,61 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.3 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.1 --> <refentry id="function.socket-close"> <refnamediv> <refname>socket_close</refname> <refpurpose>Ferme une socket</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>void</type><methodname>socket_close</methodname> <methodparam><type>resource</type><parameter>socket</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> <function>socket_close</function> ferme la socket <parameter>socket</parameter>, et détruit toutes les ressources qui y sont liées. </para> <note> <para> <function>socket_close</function> ne peut pas être utilisée sur les ressources de fichiers créées par <function>fopen</function>, <function>popen</function>, <function>fsockopen</function>, ou <function>psockopen</function>; cette fonction est destinée à traiter les sockets créées par les fonctions <function>socket_create</function> ou <function>socket_accept</function>. </para> </note> <para> Voir aussi <function>socket_bind</function>, <function>socket_listen</function>, <function>socket_create</function> et <function>socket_strerror</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.3 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.1 --> + <refentry id="function.socket-close"> + <refnamediv> + <refname>socket_close</refname> + <refpurpose>Ferme une socket</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>void</type><methodname>socket_close</methodname> + <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + <function>socket_close</function> ferme la socket + <parameter>socket</parameter>, et détruit toutes les + ressources qui y sont liées. + </para> + <note> + <para> + <function>socket_close</function> ne peut pas être utilisée + sur les ressources de fichiers créées par + <function>fopen</function>, <function>popen</function>, + <function>fsockopen</function>, ou <function>psockopen</function>; + cette fonction est destinée à traiter les sockets créées par les + fonctions <function>socket_create</function> ou + <function>socket_accept</function>. + </para> + </note> + <para> + Voir aussi + <function>socket_bind</function>, + <function>socket_listen</function>, + <function>socket_create</function> et + <function>socket_strerror</function>. + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-connect.xml diff -u phpdoc-fr/reference/sockets/functions/socket-connect.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-connect.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-connect.xml:1.3 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/functions/socket-connect.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,74 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.4 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.1 --> <refentry id="function.socket-connect"> <refnamediv> <refname>socket_connect</refname> <refpurpose>Crée une connexion sur une socket</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_connect</methodname> <methodparam><type>resource</type><parameter>socket</parameter></methodparam> <methodparam><type>string</type><parameter>address</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>port</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> <function>socket_connect</function> 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>. </para> <para> Le paramètre d'adresse <parameter>address</parameter> peut être soit une adresse IP numérique (i.e. <literal>127.0.0.1</literal>), si la socket est de la famille <constant>AF_INET</constant>; ou bien le chemin d'une socket de domaine Unix, si la socket est de la famille <constant>AF_UNIX</constant>. </para> <para> Le paramètre <parameter>port</parameter> n'est utilisé que lors de la connexion à une socket de type <constant>AF_INET</constant>, et désigne le port sur l'hôte distant, sur lequel une connexion doit être faite. </para> <para> &return.success; 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> <para> Voir aussi <function>socket_bind</function>, <function>socket_listen</function>, <function>socket_create</function>, <function>socket_last_error</function> et <function>socket_strerror</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.4 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.1 --> + <refentry id="function.socket-connect"> + <refnamediv> + <refname>socket_connect</refname> + <refpurpose>Crée une connexion sur une socket</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_connect</methodname> + <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>string</type><parameter>address</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>port</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + <function>socket_connect</function> 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>. + </para> + <para> + Le paramètre d'adresse <parameter>address</parameter> peut + être soit une adresse IP numérique (i.e. <literal>127.0.0.1</literal>), + si la socket est de la famille <constant>AF_INET</constant>; + ou bien le chemin d'une socket de domaine Unix, si la socket + est de la famille <constant>AF_UNIX</constant>. + </para> + <para> + Le paramètre <parameter>port</parameter> n'est utilisé que lors + de la connexion à une socket de type <constant>AF_INET</constant>, + et désigne le port sur l'hôte distant, sur lequel une connexion + doit être faite. + </para> + <para> + &return.success; 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> + <para> + Voir aussi + <function>socket_bind</function>, + <function>socket_listen</function>, + <function>socket_create</function>, + <function>socket_last_error</function> et + <function>socket_strerror</function>. + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-create-listen.xml diff -u phpdoc-fr/reference/sockets/functions/socket-create-listen.xml:1.2 phpdoc-fr/reference/sockets/functions/socket-create-listen.xml:1.3 --- phpdoc-fr/reference/sockets/functions/socket-create-listen.xml:1.2 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-create-listen.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,81 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.3 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-create-listen"> <refnamediv> <refname>socket_create_listen</refname> <refpurpose>Ouvre une socket sur un port pour accepter les connexions</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>resource</type><methodname>socket_create_listen</methodname> <methodparam><type>int</type><parameter>port</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>backlog</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> <function>socket_create_listen</function> est destinée à simplifier la création de nouvelles sockets destinées être mises en attente, et accepter de nouvelles connexions. </para> <para> <function>socket_create_listen</function> créée une nouvelle ressource de socket, de type <constant>AF_INET</constant>, mise en attente sur <emphasis>toutes</emphasis> les interfaces locales, pour le port <parameter>port</parameter>. </para> <para> Le paramètre <parameter>backlog</parameter> définit la taille maximum de la queue de connexions en attente. <constant>SOMAXCONN</constant> peut être utilisée comme valeur pour le paramètre <parameter>backlog</parameter>. Reportez-vous à <function>socket_listen</function> pour plus de détails. </para> <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_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> <note> <para> Si vous voulez créer une socket qui n'écoute que certaines interfaces, vous devez utiliser <function>socket_create</function>, <function>socket_bind</function> et <function>socket_listen</function>. </para> </note> <para> Voir aussi <function>socket_create</function>, <function>socket_bind</function>, <function>socket_listen</function>, <function>socket_last_error</function> et <function>socket_strerror</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.3 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-create-listen"> + <refnamediv> + <refname>socket_create_listen</refname> + <refpurpose>Ouvre une socket sur un port pour accepter les connexions</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>resource</type><methodname>socket_create_listen</methodname> + <methodparam><type>int</type><parameter>port</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>backlog</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + <function>socket_create_listen</function> est destinée à simplifier + la création de nouvelles sockets destinées être mises en attente, et + accepter de nouvelles connexions. + </para> + <para> + <function>socket_create_listen</function> créée une nouvelle + ressource de socket, de type <constant>AF_INET</constant>, mise + en attente sur <emphasis>toutes</emphasis> les interfaces locales, + pour le port <parameter>port</parameter>. + </para> + <para> + Le paramètre <parameter>backlog</parameter> définit la taille + maximum de la queue de connexions en attente. + <constant>SOMAXCONN</constant> peut être utilisée comme + valeur pour le paramètre <parameter>backlog</parameter>. Reportez-vous + à <function>socket_listen</function> pour plus de détails. + </para> + <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_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> + <note> + <para> + Si vous voulez créer une socket qui n'écoute que certaines + interfaces, vous devez utiliser <function>socket_create</function>, + <function>socket_bind</function> et <function>socket_listen</function>. + </para> + </note> + <para> + Voir aussi + <function>socket_create</function>, + <function>socket_bind</function>, + <function>socket_listen</function>, + <function>socket_last_error</function> et + <function>socket_strerror</function>. + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-create-pair.xml diff -u phpdoc-fr/reference/sockets/functions/socket-create-pair.xml:1.2 phpdoc-fr/reference/sockets/functions/socket-create-pair.xml:1.3 --- phpdoc-fr/reference/sockets/functions/socket-create-pair.xml:1.2 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-create-pair.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,44 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-create-pair"> <refnamediv> <refname>socket_create_pair</refname> <refpurpose>Crée une paire de socket identiques et les stocke dans fds. </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_create_pair</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> <methodparam><type>array</type><parameter>&fd</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-create-pair"> + <refnamediv> + <refname>socket_create_pair</refname> + <refpurpose>Crée une paire de socket identiques et les stocke dans fds. </refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_create_pair</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> + <methodparam><type>array</type><parameter>&fd</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-create.xml diff -u phpdoc-fr/reference/sockets/functions/socket-create.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-create.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-create.xml:1.3 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/functions/socket-create.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,100 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.3 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.4 --> <refentry id="function.socket-create"> <refnamediv> <refname>socket_create</refname> <refpurpose>Crée une socket (point de communication)</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>resource</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. </para> <para> Le paramètre <parameter>domain</parameter> sélectionne le domaine (famille de protocole) à utiliser pour les communications. Actuellement, <constant>AF_INET</constant> et <constant>AF_UNIX</constant> sont les valeurs possibles de ce paramètre. <constant>AF_INET</constant> est typiquement utilisé pour les communications Internet. <constant>AF_UNIX</constant> utilise des chemins systèmes pour identifier les sockets, et par conséquent, peut être uniquement utilisé pour les communications locales (mais elles seront aussi plus rapides). </para> <para> Le paramètre <parameter>type</parameter> sélectionne le type de socket. Le type est représenté par les constantes suivantes : <constant>SOCK_STREAM</constant>, <constant>SOCK_DGRAM</constant>, <constant>SOCK_SEQPACKET</constant>, <constant>SOCK_RAW</constant>, <constant>SOCK_RDM</constant> ou <constant>SOCK_PACKET</constant>. Les deux types les plus courants sont <constant>SOCK_DGRAM</constant> pour le protocole <literal>UDP</literal> (connectionless) et <constant>SOCK_STREAM</constant> pour le protocole <literal>TCP</literal>. </para> <para> <parameter>protocol</parameter> sélectionne le protocole qui peut être soit <constant>SOL_UDP</constant>, soit <constant>SOL_TCP</constant>. </para> <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_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> <para> Pour plus d'informations sur l'utilisation de <function>socket_create</function>, et sur les significations des différents paramètres, reportez-vous au manuel Unix sur les sockets (2). </para> <note> <para> Si le paramètre <parameter>domain</parameter> ou <parameter>type</parameter> est donné, <function>socket_create</function> utilisera par défaut les valeurs <constant>AF_INET</constant> et <constant>SOCK_STREAM</constant>, respectivement. De plus, elle générera un message d'aleret (<constant>E_WARNING</constant>). </para> </note> <para> Voir aussi <function>socket_accept</function>, <function>socket_bind</function>, <function>socket_connect</function>, <function>socket_listen</function>, <function>socket_last_error</function>, et <function>socket_strerror</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.3 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.4 --> + <refentry id="function.socket-create"> + <refnamediv> + <refname>socket_create</refname> + <refpurpose>Crée une socket (point de communication)</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>resource</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. + </para> + <para> + Le paramètre <parameter>domain</parameter> sélectionne le domaine + (famille de protocole) à utiliser pour les communications. Actuellement, + <constant>AF_INET</constant> et <constant>AF_UNIX</constant> sont + les valeurs possibles de ce paramètre. <constant>AF_INET</constant> + est typiquement utilisé pour les communications Internet. + <constant>AF_UNIX</constant> utilise des chemins systèmes pour + identifier les sockets, et par conséquent, peut être uniquement utilisé + pour les communications locales (mais elles seront aussi plus rapides). + </para> + <para> + Le paramètre <parameter>type</parameter> sélectionne le + type de socket. Le type est représenté par les constantes suivantes : + <constant>SOCK_STREAM</constant>, + <constant>SOCK_DGRAM</constant>, + <constant>SOCK_SEQPACKET</constant>, + <constant>SOCK_RAW</constant>, <constant>SOCK_RDM</constant> ou + <constant>SOCK_PACKET</constant>. Les deux types les plus courants + sont <constant>SOCK_DGRAM</constant> pour le protocole <literal>UDP</literal> + (connectionless) et <constant>SOCK_STREAM</constant> pour le protocole + <literal>TCP</literal>. + </para> + <para> + <parameter>protocol</parameter> sélectionne le protocole qui peut être + soit <constant>SOL_UDP</constant>, soit <constant>SOL_TCP</constant>. + </para> + <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_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> + <para> + Pour plus d'informations sur l'utilisation de <function>socket_create</function>, + et sur les significations des différents paramètres, reportez-vous au + manuel Unix sur les sockets (2). + </para> + <note> + <para> + Si le paramètre <parameter>domain</parameter> ou <parameter>type</parameter> + est donné, <function>socket_create</function> utilisera par défaut + les valeurs <constant>AF_INET</constant> et + <constant>SOCK_STREAM</constant>, respectivement. De plus, elle + générera un message d'aleret (<constant>E_WARNING</constant>). + </para> + </note> + <para> + Voir aussi + <function>socket_accept</function>, + <function>socket_bind</function>, + <function>socket_connect</function>, + <function>socket_listen</function>, + <function>socket_last_error</function>, et + <function>socket_strerror</function>. + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-get-option.xml diff -u phpdoc-fr/reference/sockets/functions/socket-get-option.xml:1.2 phpdoc-fr/reference/sockets/functions/socket-get-option.xml:1.3 --- phpdoc-fr/reference/sockets/functions/socket-get-option.xml:1.2 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-get-option.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,49 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.3 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-get-option"> <refnamediv> <refname>socket_get_option</refname> <refpurpose>Lit les options de socket</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>mixed</type><methodname>socket_get_option</methodname> <methodparam><type>resource</type><parameter>socket</parameter></methodparam> <methodparam><type>int</type><parameter>level</parameter></methodparam> <methodparam><type>int</type><parameter>optname</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> <note> <para> Cette fonction était appelée <literal>socket_getopt()</literal> avant PHP 4.3.0. </para> </note> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.3 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-get-option"> + <refnamediv> + <refname>socket_get_option</refname> + <refpurpose>Lit les options de socket</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>mixed</type><methodname>socket_get_option</methodname> + <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>int</type><parameter>level</parameter></methodparam> + <methodparam><type>int</type><parameter>optname</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + <note> + <para> + Cette fonction était appelée <literal>socket_getopt()</literal> avant + PHP 4.3.0. + </para> + </note> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-getpeername.xml diff -u phpdoc-fr/reference/sockets/functions/socket-getpeername.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-getpeername.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-getpeername.xml:1.3 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/functions/socket-getpeername.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,68 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.5 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-getpeername"> <refnamediv> <refname>socket_getpeername</refname> <refpurpose> Interroge l'autre extrémité de la communication </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_getpeername</methodname> <methodparam><type>resource</type><parameter>socket</parameter></methodparam> <methodparam><type>string</type><parameter>&addr</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>&port</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> Si la socket <parameter>socket</parameter> est de type <constant>AF_INET</constant>, <function>socket_getpeername</function> retournera <emphasis>l'adresse IP</emphasis> de l'hôte, en notation numérique (e.g. <literal>127.0.0.1</literal>) dans le paramètre <parameter>address</parameter>, et si le paramètre optionnel <parameter>port</parameter> est présent, elle retournera aussi le port de la communication établie. </para> <para> Si la socket <parameter>socket</parameter> est de type <constant>AF_UNIX</constant>, <function>socket_getpeername</function> retournera le chemin sur le système de fichiers (e.g. <literal>/var/run/daemon.sock</literal>) dans le paramètre <parameter>address</parameter>. </para> <para> &return.success; <function>socket_getpeername</function> peut aussi retourner &false; si le type de la socket n'est ni <constant>AF_INET</constant> ni <constant>AF_UNIX</constant>, auquel cas le dernier code d'erreur socket n'est <emphasis>pas</emphasis> modifié. </para> <para> Voir aussi <function>socket_getsockname</function>, <function>socket_last_error</function> et <function>socket_strerror</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.5 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-getpeername"> + <refnamediv> + <refname>socket_getpeername</refname> + <refpurpose> + Interroge l'autre extrémité de la communication + </refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_getpeername</methodname> + <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>string</type><parameter>&addr</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>&port</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + Si la socket <parameter>socket</parameter> est de type <constant>AF_INET</constant>, + <function>socket_getpeername</function> retournera + <emphasis>l'adresse IP</emphasis> de l'hôte, en notation numérique (e.g. + <literal>127.0.0.1</literal>) dans le paramètre <parameter>address</parameter>, + et si le paramètre optionnel <parameter>port</parameter> est présent, elle + retournera aussi le port de la communication établie. + </para> + <para> + Si la socket <parameter>socket</parameter> est de type <constant>AF_UNIX</constant>, + <function>socket_getpeername</function> retournera le chemin sur le + système de fichiers (e.g. <literal>/var/run/daemon.sock</literal>) dans le + paramètre <parameter>address</parameter>. + </para> + <para> + &return.success; <function>socket_getpeername</function> peut aussi + retourner &false; si le type de la socket n'est ni <constant>AF_INET</constant> + ni <constant>AF_UNIX</constant>, auquel cas le dernier code d'erreur socket + n'est <emphasis>pas</emphasis> modifié. + </para> + <para> + Voir aussi + <function>socket_getsockname</function>, + <function>socket_last_error</function> et + <function>socket_strerror</function>. + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-getsockname.xml diff -u phpdoc-fr/reference/sockets/functions/socket-getsockname.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-getsockname.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-getsockname.xml:1.3 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-getsockname.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,68 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.3 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-getsockname"> <refnamediv> <refname>socket_getsockname</refname> <refpurpose> Interroge la socket locale </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_getsockname</methodname> <methodparam><type>resource</type><parameter>socket</parameter></methodparam> <methodparam><type>string</type><parameter>&addr</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>&port</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> Si la socket <parameter>socket</parameter> est de type <constant>AF_INET</constant>, <function>socket_getsockname</function> retournera <emphasis>l'adresse IP</emphasis> locale, en notation numérique (e.g. <literal>127.0.0.1</literal>) dans le paramètre <parameter>address</parameter>, et si le paramètre optionnel <parameter>port</parameter> est présent, elle retournera aussi le port de la communication établie. </para> <para> Si la socket <parameter>socket</parameter> est de type <constant>AF_UNIX</constant>, <function>socket_getsockname</function> retournera le chemin sur le système de fichiers (e.g. <literal>/var/run/daemon.sock</literal>) dans le paramètre <parameter>address</parameter>. </para> <para> &return.success; <function>socket_getsockname</function> peut aussi retourner &false; si le type de la socket n'est ni <constant>AF_INET</constant> ni <constant>AF_UNIX</constant>, auquel cas le dernier code d'erreur socket n'est <emphasis>pas</emphasis> modifié. </para> <para> Voir aussi <function>socket_getpeername</function>, <function>socket_last_error</function> et <function>socket_strerror</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.3 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-getsockname"> + <refnamediv> + <refname>socket_getsockname</refname> + <refpurpose> + Interroge la socket locale + </refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_getsockname</methodname> + <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>string</type><parameter>&addr</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>&port</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + Si la socket <parameter>socket</parameter> est de type <constant>AF_INET</constant>, + <function>socket_getsockname</function> retournera + <emphasis>l'adresse IP</emphasis> locale, en notation numérique (e.g. + <literal>127.0.0.1</literal>) dans le paramètre <parameter>address</parameter>, + et si le paramètre optionnel <parameter>port</parameter> est présent, elle + retournera aussi le port de la communication établie. + </para> + <para> + Si la socket <parameter>socket</parameter> est de type <constant>AF_UNIX</constant>, + <function>socket_getsockname</function> retournera le chemin sur le + système de fichiers (e.g. <literal>/var/run/daemon.sock</literal>) dans le + paramètre <parameter>address</parameter>. + </para> + <para> + &return.success; <function>socket_getsockname</function> peut aussi + retourner &false; si le type de la socket n'est ni <constant>AF_INET</constant> + ni <constant>AF_UNIX</constant>, auquel cas le dernier code d'erreur socket + n'est <emphasis>pas</emphasis> modifié. + </para> + <para> + Voir aussi + <function>socket_getpeername</function>, + <function>socket_last_error</function> et + <function>socket_strerror</function>. + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-iovec-add.xml diff -u phpdoc-fr/reference/sockets/functions/socket-iovec-add.xml:1.1 phpdoc-fr/reference/sockets/functions/socket-iovec-add.xml:1.2 --- phpdoc-fr/reference/sockets/functions/socket-iovec-add.xml:1.1 Wed Jul 24 23:40:32 2002 +++ phpdoc-fr/reference/sockets/functions/socket-iovec-add.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,42 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-iovec-add"> <refnamediv> <refname>socket_iovec_add</refname> <refpurpose>Ajoute un nouveau vecteur dans le tableau</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_iovec_add</methodname> <methodparam><type>resource</type><parameter>iovec</parameter></methodparam> <methodparam><type>int</type><parameter>iov_len</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-iovec-add"> + <refnamediv> + <refname>socket_iovec_add</refname> + <refpurpose>Ajoute un nouveau vecteur dans le tableau</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_iovec_add</methodname> + <methodparam><type>resource</type><parameter>iovec</parameter></methodparam> + <methodparam><type>int</type><parameter>iov_len</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-iovec-alloc.xml diff -u phpdoc-fr/reference/sockets/functions/socket-iovec-alloc.xml:1.1 phpdoc-fr/reference/sockets/functions/socket-iovec-alloc.xml:1.2 --- phpdoc-fr/reference/sockets/functions/socket-iovec-alloc.xml:1.1 Wed Jul 24 23:40:32 2002 +++ phpdoc-fr/reference/sockets/functions/socket-iovec-alloc.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,42 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-iovec-alloc"> <refnamediv> <refname>socket_iovec_alloc</refname> <refpurpose>Construit un 'struct iovec'</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>resource</type><methodname>socket_iovec_alloc</methodname> <methodparam><type>int</type><parameter>num_vectors</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter/></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-iovec-alloc"> + <refnamediv> + <refname>socket_iovec_alloc</refname> + <refpurpose>Construit un 'struct iovec'</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>resource</type><methodname>socket_iovec_alloc</methodname> + <methodparam><type>int</type><parameter>num_vectors</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter/></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-iovec-delete.xml diff -u phpdoc-fr/reference/sockets/functions/socket-iovec-delete.xml:1.1 phpdoc-fr/reference/sockets/functions/socket-iovec-delete.xml:1.2 --- phpdoc-fr/reference/sockets/functions/socket-iovec-delete.xml:1.1 Wed Jul 24 23:40:32 2002 +++ phpdoc-fr/reference/sockets/functions/socket-iovec-delete.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,42 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-iovec-delete"> <refnamediv> <refname>socket_iovec_delete</refname> <refpurpose>Efface un vecteur</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_iovec_delete</methodname> <methodparam><type>resource</type><parameter>iovec</parameter></methodparam> <methodparam><type>int</type><parameter>iov_pos</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-iovec-delete"> + <refnamediv> + <refname>socket_iovec_delete</refname> + <refpurpose>Efface un vecteur</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_iovec_delete</methodname> + <methodparam><type>resource</type><parameter>iovec</parameter></methodparam> + <methodparam><type>int</type><parameter>iov_pos</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-iovec-fetch.xml diff -u phpdoc-fr/reference/sockets/functions/socket-iovec-fetch.xml:1.2 phpdoc-fr/reference/sockets/functions/socket-iovec-fetch.xml:1.3 --- phpdoc-fr/reference/sockets/functions/socket-iovec-fetch.xml:1.2 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-iovec-fetch.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,42 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-iovec-fetch"> <refnamediv> <refname>socket_iovec_fetch</refname> <refpurpose>Lit les données du vecteur specifié par iovec_id[iovec_position] </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>string</type><methodname>socket_iovec_fetch</methodname> <methodparam><type>resource</type><parameter>iovec</parameter></methodparam> <methodparam><type>int</type><parameter>iovec_position</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-iovec-fetch"> + <refnamediv> + <refname>socket_iovec_fetch</refname> + <refpurpose>Lit les données du vecteur specifié par iovec_id[iovec_position] </refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>string</type><methodname>socket_iovec_fetch</methodname> + <methodparam><type>resource</type><parameter>iovec</parameter></methodparam> + <methodparam><type>int</type><parameter>iovec_position</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-iovec-free.xml diff -u phpdoc-fr/reference/sockets/functions/socket-iovec-free.xml:1.2 phpdoc-fr/reference/sockets/functions/socket-iovec-free.xml:1.3 --- phpdoc-fr/reference/sockets/functions/socket-iovec-free.xml:1.2 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-iovec-free.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,41 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-iovec-free"> <refnamediv> <refname>socket_iovec_free</refname> <refpurpose>Détruit le vecteur iovec specifié par iovec_id </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_iovec_free</methodname> <methodparam><type>resource</type><parameter>iovec</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-iovec-free"> + <refnamediv> + <refname>socket_iovec_free</refname> + <refpurpose>Détruit le vecteur iovec specifié par iovec_id </refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_iovec_free</methodname> + <methodparam><type>resource</type><parameter>iovec</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-iovec-set.xml diff -u phpdoc-fr/reference/sockets/functions/socket-iovec-set.xml:1.2 phpdoc-fr/reference/sockets/functions/socket-iovec-set.xml:1.3 --- phpdoc-fr/reference/sockets/functions/socket-iovec-set.xml:1.2 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-iovec-set.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,43 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-iovec-set"> <refnamediv> <refname>socket_iovec_set</refname> <refpurpose>Modifie les données du vecteur iovec_id[iovec_position]</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_iovec_set</methodname> <methodparam><type>resource</type><parameter>iovec</parameter></methodparam> <methodparam><type>int</type><parameter>iovec_position</parameter></methodparam> <methodparam><type>string</type><parameter>new_val</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-iovec-set"> + <refnamediv> + <refname>socket_iovec_set</refname> + <refpurpose>Modifie les données du vecteur iovec_id[iovec_position]</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_iovec_set</methodname> + <methodparam><type>resource</type><parameter>iovec</parameter></methodparam> + <methodparam><type>int</type><parameter>iovec_position</parameter></methodparam> + <methodparam><type>string</type><parameter>new_val</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-last-error.xml diff -u phpdoc-fr/reference/sockets/functions/socket-last-error.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-last-error.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-last-error.xml:1.3 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/functions/socket-last-error.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,68 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.4 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.1 --> <refentry id="function.socket-last-error"> <refnamediv> <refname>socket_last_error</refname> <refpurpose>Lit la dernière erreur générée par une socket</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>socket_last_error</methodname> <methodparam choice="opt"><type>resource</type><parameter>socket</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> <function>socket_last_error</function> retourne un code d'erreur socket. </para> <para> Si un paramètre est passé à cette fonction, la dernière erreur qui aura été générée par cette socket sera retournée. Si la ressource de socket est omise, 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 retourne pas de socket en cas d'echec, et <function>socket_select</function> qui peut échouer sans raison directement liée à la socket. Le code d'erreur peut être transmis à <function>socket_strerror</function> qui retourne un message d'erreur lisible. <programlisting role="php"><![CDATA[<?php if (false == ($socket = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP))) { die("Impossible de créer la socket, le code d'erreur est : " . socket_last_error() . ", le message d'erreur est : " . socket_strerror(socket_last_error())); }?>]]> </programlisting> </para> <note> <para> <function>socket_last_error</function> n'efface pas le code d'erreur. Utilisez plutôt la fonction <function>socket_clear_error</function> pour cela. </para> </note> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.4 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.1 --> + <refentry id="function.socket-last-error"> + <refnamediv> + <refname>socket_last_error</refname> + <refpurpose>Lit la dernière erreur générée par une socket</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>int</type><methodname>socket_last_error</methodname> + <methodparam choice="opt"><type>resource</type><parameter>socket</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + <function>socket_last_error</function> retourne un code d'erreur socket. + </para> + <para> + Si un paramètre est passé à cette fonction, la dernière erreur + qui aura été générée par cette socket sera retournée. Si la ressource + de socket est omise, 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 retourne pas de socket + en cas d'echec, et <function>socket_select</function> qui peut + échouer sans raison directement liée à la socket. Le code d'erreur + peut être transmis à <function>socket_strerror</function> qui retourne + un message d'erreur lisible. + <programlisting role="php"> +<![CDATA[ +<?php + if (false == ($socket = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP))) { + die("Impossible de créer la socket, le code d'erreur est : " . socket_last_error() . + ", le message d'erreur est : " . socket_strerror(socket_last_error())); + } +?> +]]> + </programlisting> + </para> + <note> + <para> + <function>socket_last_error</function> n'efface pas le code d'erreur. Utilisez + plutôt la fonction <function>socket_clear_error</function> pour cela. + </para> + </note> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-listen.xml diff -u phpdoc-fr/reference/sockets/functions/socket-listen.xml:1.2 phpdoc-fr/reference/sockets/functions/socket-listen.xml:1.3 --- phpdoc-fr/reference/sockets/functions/socket-listen.xml:1.2 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-listen.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,82 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.3 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.1 --> <refentry id="function.socket-listen"> <refnamediv> <refname>socket_listen</refname> <refpurpose>Attend une connexion (listen) sur une socket</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_listen</methodname> <methodparam><type>resource</type><parameter>socket</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>backlog</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> Une fois que la socket <parameter>socket</parameter> a été créée avec la focntion <function>socket_create</function> et liée à un nom avec la fonction <function>socket_bind</function>, elle peut être mise en attente de connexion entrantes. </para> <para> Un nombre maximum de <parameter>backlog</parameter> connexions seront mises en attente de traitement. Si une demande de connexion arrive et que la queue est pleine, le client recevra une erreur indiquant <literal>ECONNREFUSED</literal>, ou, si le protocole de support accepte les retransmissions, la requête sera ignorée pour que les tentatives ultérieures finissent par réussir. </para> <note> <para> Le nombre maximum passé dans le paramètre <parameter>backlog</parameter> dépend essentiellement de la plate forme de support. Sur Linux, c'est tronqué automatiquement à <constant>SOMAXCONN</constant>. Sous Windows32, si la constante <constant>SOMAXCONN</constant> est passée, le service responsable des sockets choisira une valeur maximum <emphasis>raisonnable</emphasis>. Il n'y a pas de méthode pour deviner la valeur réellement choisie. </para> </note> <para> <function>socket_listen</function> ne fonctionne qu'avec des sockets de type <constant>SOCK_STREAM</constant> et <constant>SOCK_SEQPACKET</constant>. </para> <para> &return.success; 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> <para> Voir aussi <function>socket_accept</function>, <function>socket_bind</function>, <function>socket_connect</function>, <function>socket_create</function> et <function>socket_strerror</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.3 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.1 --> + <refentry id="function.socket-listen"> + <refnamediv> + <refname>socket_listen</refname> + <refpurpose>Attend une connexion (listen) sur une socket</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_listen</methodname> + <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>backlog</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + Une fois que la socket <parameter>socket</parameter> a été créée avec la focntion + <function>socket_create</function> et liée à un nom avec la fonction + <function>socket_bind</function>, elle peut être mise en attente de connexion + entrantes. + </para> + <para> + Un nombre maximum de <parameter>backlog</parameter> connexions seront mises + en attente de traitement. Si une demande de connexion arrive et que la + queue est pleine, le client recevra une erreur indiquant + <literal>ECONNREFUSED</literal>, ou, si le protocole de support accepte + les retransmissions, la requête sera ignorée pour que les tentatives + ultérieures finissent par réussir. + </para> + <note> + <para> + Le nombre maximum passé dans le paramètre <parameter>backlog</parameter> + dépend essentiellement de la plate forme de support. Sur Linux, c'est + tronqué automatiquement à <constant>SOMAXCONN</constant>. Sous Windows32, + si la constante <constant>SOMAXCONN</constant> est passée, le service + responsable des sockets choisira une valeur maximum <emphasis>raisonnable</emphasis>. + Il n'y a pas de méthode pour deviner la valeur réellement choisie. + </para> + </note> + <para> + <function>socket_listen</function> ne fonctionne qu'avec des sockets de + type <constant>SOCK_STREAM</constant> et <constant>SOCK_SEQPACKET</constant>. + </para> + <para> + &return.success; 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> + <para> + Voir aussi + <function>socket_accept</function>, + <function>socket_bind</function>, + <function>socket_connect</function>, + <function>socket_create</function> et + <function>socket_strerror</function>. + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-read.xml diff -u phpdoc-fr/reference/sockets/functions/socket-read.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-read.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-read.xml:1.3 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/functions/socket-read.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,92 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.3 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.8 --> <refentry id="function.socket-read"> <refnamediv> <refname>socket_read</refname> <refpurpose>Lit des données d'une socket</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>string</type><methodname>socket_read</methodname> <methodparam><type>resource</type><parameter>socket</parameter></methodparam> <methodparam><type>int</type><parameter>length</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>type</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> <function>socket_read</function> lit des données dans la socket <parameter>socket</parameter>, qui doit être une ressource créée par <function>socket_accept</function>. Elle lit un maximum de <parameter>length</parameter> octets. Sinon, vous pouvez utiliser <constant>\r</constant>, <constant>\n</constant> or <constant>\0</constant> pour terminer la lecture (suivant la valeur choisie pour <parameter>type</parameter>, voir ci-dessous). </para> <para> <function>socket_read</function> retourne les données sous forme de chaine 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> <note> <para> <function>socket_read</function> peut retourner une chaîne de longueur zéro, qui indique la fin de la communication (l'autre socket a fermé la communication). </para> </note> <para> Le paramètre optinnel <parameter>type</parameter> peut prendre l'une des valeurs constantes suivantes : <itemizedlist> <listitem> <simpara> PHP_BINARY_READ - utilise la fonction système <literal>read()</literal>. Capable de lire les données binaires. (valeur par défaut en PHP >= 4.1.0) </simpara> </listitem> <listitem> <simpara> PHP_NORMAL_READ - la lecture s'arrête aux \n et \r. (valeur par défaut en PHP <= 4.0.6) </simpara> </listitem> </itemizedlist> </para> <para> Voir aussi <function>socket_accept</function>, <function>socket_bind</function>, <function>socket_connect</function>, <function>socket_listen</function>, <function>socket_last_error</function>, <function>socket_strerror</function> et <function>socket_write</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.3 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.8 --> + <refentry id="function.socket-read"> + <refnamediv> + <refname>socket_read</refname> + <refpurpose>Lit des données d'une socket</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>string</type><methodname>socket_read</methodname> + <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>int</type><parameter>length</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>type</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + <function>socket_read</function> lit des données dans la socket + <parameter>socket</parameter>, qui doit être une ressource créée par + <function>socket_accept</function>. Elle lit un maximum de + <parameter>length</parameter> octets. Sinon, vous pouvez utiliser + <constant>\r</constant>, <constant>\n</constant> or <constant>\0</constant> + pour terminer la lecture (suivant la valeur choisie pour <parameter>type</parameter>, + voir ci-dessous). + </para> + <para> + <function>socket_read</function> retourne les données sous forme de + chaine 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> + <note> + <para> + <function>socket_read</function> peut retourner une chaîne de longueur + zéro, qui indique la fin de la communication (l'autre socket a fermé + la communication). + </para> + </note> + <para> + Le paramètre optinnel <parameter>type</parameter> peut prendre l'une des valeurs + constantes suivantes : + <itemizedlist> + <listitem> + <simpara> + PHP_BINARY_READ - utilise la fonction système <literal>read()</literal>. + Capable de lire les données binaires. (valeur par défaut en PHP >= 4.1.0) + </simpara> + </listitem> + <listitem> + <simpara> + PHP_NORMAL_READ - la lecture s'arrête aux \n et \r. + (valeur par défaut en PHP <= 4.0.6) + </simpara> + </listitem> + </itemizedlist> + </para> + <para> + Voir aussi + <function>socket_accept</function>, + <function>socket_bind</function>, + <function>socket_connect</function>, + <function>socket_listen</function>, + <function>socket_last_error</function>, + <function>socket_strerror</function> et + <function>socket_write</function>. + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-readv.xml diff -u phpdoc-fr/reference/sockets/functions/socket-readv.xml:1.2 phpdoc-fr/reference/sockets/functions/socket-readv.xml:1.3 --- phpdoc-fr/reference/sockets/functions/socket-readv.xml:1.2 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-readv.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,42 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-readv"> <refnamediv> <refname>socket_readv</refname> <refpurpose>Lit des données dans un fd, en utilisant le tableau scatter-gather définit par iovec_id </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_readv</methodname> <methodparam><type>resource</type><parameter>socket</parameter></methodparam> <methodparam><type>resource</type><parameter>iovec_id</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-readv"> + <refnamediv> + <refname>socket_readv</refname> + <refpurpose>Lit des données dans un fd, en utilisant le tableau scatter-gather définit par iovec_id </refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_readv</methodname> + <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>resource</type><parameter>iovec_id</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-recv.xml diff -u phpdoc-fr/reference/sockets/functions/socket-recv.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-recv.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-recv.xml:1.3 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/functions/socket-recv.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,44 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-recv"> <refnamediv> <refname>socket_recv</refname> <refpurpose>Reçoit des données d'une socket connectée</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>socket_recv</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> <methodparam><type>int</type><parameter>flags</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-recv"> + <refnamediv> + <refname>socket_recv</refname> + <refpurpose>Reçoit des données d'une socket connectée</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>int</type><methodname>socket_recv</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> + <methodparam><type>int</type><parameter>flags</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-recvfrom.xml diff -u phpdoc-fr/reference/sockets/functions/socket-recvfrom.xml:1.2 phpdoc-fr/reference/sockets/functions/socket-recvfrom.xml:1.3 --- phpdoc-fr/reference/sockets/functions/socket-recvfrom.xml:1.2 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-recvfrom.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,46 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-recvfrom"> <refnamediv> <refname>socket_recvfrom</refname> <refpurpose>Reçoit des données d'une socket, connectée ou pas </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>socket_recvfrom</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> <methodparam><type>int</type><parameter>flags</parameter></methodparam> <methodparam><type>string</type><parameter>&name</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>&port</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-recvfrom"> + <refnamediv> + <refname>socket_recvfrom</refname> + <refpurpose>Reçoit des données d'une socket, connectée ou pas </refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>int</type><methodname>socket_recvfrom</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> + <methodparam><type>int</type><parameter>flags</parameter></methodparam> + <methodparam><type>string</type><parameter>&name</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>&port</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-recvmsg.xml diff -u phpdoc-fr/reference/sockets/functions/socket-recvmsg.xml:1.2 phpdoc-fr/reference/sockets/functions/socket-recvmsg.xml:1.3 --- phpdoc-fr/reference/sockets/functions/socket-recvmsg.xml:1.2 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-recvmsg.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,47 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-recvmsg"> <refnamediv> <refname>socket_recvmsg</refname> <refpurpose>Reçoit des messages sur uen socket, qu'elle soit orientée connexion ou pas</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_recvmsg</methodname> <methodparam><type>resource</type><parameter>socket</parameter></methodparam> <methodparam><type>resource</type><parameter>iovec</parameter></methodparam> <methodparam><type>array</type><parameter>&control</parameter></methodparam> <methodparam><type>int</type><parameter>&controllen</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></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-recvmsg"> + <refnamediv> + <refname>socket_recvmsg</refname> + <refpurpose>Reçoit des messages sur uen socket, qu'elle soit orientée connexion ou pas</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_recvmsg</methodname> + <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>resource</type><parameter>iovec</parameter></methodparam> + <methodparam><type>array</type><parameter>&control</parameter></methodparam> + <methodparam><type>int</type><parameter>&controllen</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></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-select.xml diff -u phpdoc-fr/reference/sockets/functions/socket-select.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-select.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-select.xml:1.3 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/functions/socket-select.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,194 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.7 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-select"> <refnamediv> <refname>socket_select</refname> <refpurpose>Exécute l'appel système select() un tableau de socket avec une durée d'expiration</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>socket_select</methodname> <methodparam><type>resource</type><parameter>&read</parameter></methodparam> <methodparam><type>resource</type><parameter>&write</parameter></methodparam> <methodparam><type>resource</type><parameter>&except</parameter></methodparam> <methodparam><type>int</type><parameter>tv_sec</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>tv_usec</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <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 reconnaitront dans ces tableaux de sockets les sets de file descriptor. Trois tableaux indépendants de ressources de sockets sont surveillés. </para> <para> Les sockets listées dans le paramètre <parameter>read</parameter> seront surveillées en lecture : pour savoir quand elles sont disponibles en lecture (plus précisément, si une lecture ne va pas bloquer, en particulier, une ressource de socket a déjà atteint une fin de fichier, auquel cas <function>socket_read</function> retournera une chaîne de taille zéro). </para> <para> Les sockets listées dans <parameter>write</parameter> seront surveillées en écriture : pour voir si une écriture ne va pas bloquer. </para> <para> Les sockets listées dans <parameter>except</parameter> seront surveillées pour leurs exceptions. </para> <warning> <para> En sortie de fonction, les tableaux sont modifiées pour indiquer quelles sockets ont changés d'états. </para> </warning> <para> Vous n'avez pas besoin de passer tous les tableaux à <function>socket_select</function>. Vous pouvez les omettre, ou utiliser un tableau vide, ou encore &null; à la place. N'oubliez pas que ces tableaux sont passés par <emphasis>référence</emphasis> et seront modifiés par <function>socket_select</function>. </para> <para> Exemple: <programlisting role="php"><![CDATA[<?php /* Prépare le tableau read (socket surveillées en lecture) */ $read = array($socket1, $socket2); if (false === ($num_changed_sockets = socket_select($read, $write = NULL, $except = NULL, 0))) { /* Gestion des erreurs */ else if ($num_changed_sockets > 0) { /* Au moins une des sockets a été modifié */ }?>]]> </programlisting> </para> <note> <para> A cause d'une limitation du Zend Engine actuel, il n'est pas possible de passer une constante comme &null; directement comme paramètre à cette focntion, qui attend une valeur par référence. A la place, utiliser un tableau temporaireou une expression dont le membre de gauche est une variable temporaire : <programlisting role="php"><![CDATA[<?php socket_select($r, $w, $e = NULL, 0);?>]]> </programlisting> </para> </note> <para> Les paramètres <parameter>tv_sec</parameter> and <parameter>tv_usec</parameter> ensemble forment le paramètre <emphasis>timeout</emphasis> (durée de vie). Le <emphasis>timeout</emphasis> 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 <function>socket_select</function> retournera immédiatement. C'est très pratique opur faire du polling (sondage). Si <parameter>tv_sec</parameter> est &null; (pas de timeout), <function>socket_select</function> peut se bloquer indéfiniment. </para> <para> En cas de succès, <function>socket_select</function> retourne le nombre de sockets contenus dans les tableaux modifiées. Ce nombre peut être zéro si la durée maximale d'attente a été atteinte. En cas d'erreur, &false; est retourné. 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> <note> <para> Assurez vous bien d'utiliser l'opérateur <literal>===</literal> lorsque vous vérifiez les erreurs. Etant donnée que <function>socket_select</function> peut retourner 0, la comparaison avec &false via <literal>==</literal> donnerait &true; : <programlisting role="php"><![CDATA[<?php if (false === socket_select($r, $w, $e = NULL, 0)) { echo "socket_select() a échoué. Raison : " . socket_strerror(socket_last_error()) . "\n"; }?>]]> </programlisting> </para> </note> <note> <para> Méfiez vous des implémentations de sockets, qui doivent être manipulées avec délicatesse. Quelques règles de base : <itemizedlist> <listitem> <simpara> Vous devez toujours essayer d'utiliser <function>socket_select</function> sans timeout. Votre programme ne devrait avoir rien à faire si il n'y a pas de données disponibles. Le code qui dépends d'un timeout est généralement peut portable, et difficile à déboguer. </simpara> </listitem> <listitem> <simpara> Une socket ne doit pas être ajoutée à l'un des tableaux en paramètre, si vous ne souhaitez pas vérifier le résultat après l'appel à <function>socket_select</function>. Après le retour de <function>socket_select</function>, toutes les sockets dans tous les tableaux doivent être vérifiées. Toute socket qui est disponible en écriture ou en lecture doit être utilisée pour écrire ou lire. </simpara> </listitem> <listitem> <simpara> Si vous écrivez ou lisez avec une socket retournée dans un tableau, soyez conscient qu'elles ne pourront pas écrire ou lire toutes les données que vous demandez. Soyez prêts à ne pouvoir lire qu'un seul octet. </simpara> </listitem> <listitem> <simpara> Il est commun à la plupart des implémentations de socket que la seule exception interceptée par les sockets dans le tableau <parameter>except</parameter> est le cas des données hors limites, reçues par une socket. </simpara> </listitem> </itemizedlist> </para> </note> <para> Voir aussi <function>socket_read</function>, <function>socket_write</function>, <function>socket_last_error</function> et <function>socket_strerror</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.7 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-select"> + <refnamediv> + <refname>socket_select</refname> + <refpurpose>Exécute l'appel système select() un tableau de socket avec une durée d'expiration</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>int</type><methodname>socket_select</methodname> + <methodparam><type>resource</type><parameter>&read</parameter></methodparam> + <methodparam><type>resource</type><parameter>&write</parameter></methodparam> + <methodparam><type>resource</type><parameter>&except</parameter></methodparam> + <methodparam><type>int</type><parameter>tv_sec</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>tv_usec</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <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 reconnaitront dans ces tableaux de sockets les + sets de file descriptor. Trois tableaux indépendants de ressources + de sockets sont surveillés. + </para> + <para> + Les sockets listées dans le paramètre <parameter>read</parameter> seront surveillées + en lecture : pour savoir quand elles sont disponibles en lecture (plus + précisément, si une lecture ne va pas bloquer, en particulier, une ressource + de socket a déjà atteint une fin de fichier, auquel cas + <function>socket_read</function> retournera une chaîne de taille zéro). + </para> + <para> + Les sockets listées dans <parameter>write</parameter> seront surveillées + en écriture : pour voir si une écriture ne va pas bloquer. + </para> + <para> + Les sockets listées dans <parameter>except</parameter> seront surveillées pour + leurs exceptions. + </para> + <warning> + <para> + En sortie de fonction, les tableaux sont modifiées pour indiquer + quelles sockets ont changés d'états. + </para> + </warning> + <para> + Vous n'avez pas besoin de passer tous les tableaux à + <function>socket_select</function>. Vous pouvez les omettre, ou + utiliser un tableau vide, ou encore &null; à la place. N'oubliez pas + que ces tableaux sont passés par <emphasis>référence</emphasis> et + seront modifiés par <function>socket_select</function>. + </para> + <para> + Exemple: + <programlisting role="php"> +<![CDATA[ +<?php + /* Prépare le tableau read (socket surveillées en lecture) */ + $read = array($socket1, $socket2); + + if (false === ($num_changed_sockets = socket_select($read, $write = NULL, $except = NULL, 0))) { + /* Gestion des erreurs */ + else if ($num_changed_sockets > 0) { + /* Au moins une des sockets a été modifié */ + } +?> +]]> + </programlisting> + </para> + <note> + <para> + A cause d'une limitation du Zend Engine actuel, il n'est pas possible + de passer une constante comme &null; directement comme paramètre à cette + focntion, qui attend une valeur par référence. A la place, utiliser + un tableau temporaireou une expression dont le membre de gauche + est une variable temporaire : + <programlisting role="php"> +<![CDATA[ +<?php + socket_select($r, $w, $e = NULL, 0); +?> +]]> + </programlisting> + </para> + </note> + <para> + Les paramètres <parameter>tv_sec</parameter> and <parameter>tv_usec</parameter> + ensemble forment le paramètre <emphasis>timeout</emphasis> (durée de vie). + Le <emphasis>timeout</emphasis> 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 + <function>socket_select</function> retournera immédiatement. C'est très + pratique opur faire du polling (sondage). Si <parameter>tv_sec</parameter> est &null; + (pas de timeout), <function>socket_select</function> peut se bloquer indéfiniment. + </para> + <para> + En cas de succès, <function>socket_select</function> retourne le nombre de + sockets contenus dans les tableaux modifiées. Ce nombre peut être zéro si + la durée maximale d'attente a été atteinte. En cas d'erreur, &false; + est retourné. 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> + <note> + <para> + Assurez vous bien d'utiliser l'opérateur <literal>===</literal> + lorsque vous vérifiez les erreurs. Etant donnée que + <function>socket_select</function> peut retourner 0, la comparaison + avec &false via <literal>==</literal> donnerait &true; : + <programlisting role="php"> +<![CDATA[ +<?php + if (false === socket_select($r, $w, $e = NULL, 0)) { + echo "socket_select() a échoué. Raison : " . socket_strerror(socket_last_error()) . "\n"; + } +?> +]]> + </programlisting> + </para> + </note> + <note> + <para> + Méfiez vous des implémentations de sockets, qui doivent être manipulées avec + délicatesse. Quelques règles de base : + <itemizedlist> + <listitem> + <simpara> + Vous devez toujours essayer d'utiliser <function>socket_select</function> + sans timeout. Votre programme ne devrait avoir rien à faire si + il n'y a pas de données disponibles. Le code qui dépends d'un + timeout est généralement peut portable, et difficile à déboguer. + </simpara> + </listitem> + <listitem> + <simpara> + Une socket ne doit pas être ajoutée à l'un des tableaux en paramètre, + si vous ne souhaitez pas vérifier le résultat après l'appel à + <function>socket_select</function>. Après le retour de + <function>socket_select</function>, toutes les sockets dans tous les + tableaux doivent être vérifiées. Toute socket qui est disponible en + écriture ou en lecture doit être utilisée pour écrire ou lire. + </simpara> + </listitem> + <listitem> + <simpara> + Si vous écrivez ou lisez avec une socket retournée dans un tableau, + soyez conscient qu'elles ne pourront pas écrire ou lire toutes les données + que vous demandez. Soyez prêts à ne pouvoir lire qu'un seul octet. + </simpara> + </listitem> + <listitem> + <simpara> + Il est commun à la plupart des implémentations de socket que la seule + exception interceptée par les sockets dans le tableau + <parameter>except</parameter> est le cas des données hors limites, + reçues par une socket. + </simpara> + </listitem> + </itemizedlist> + </para> + </note> + <para> + Voir aussi + <function>socket_read</function>, + <function>socket_write</function>, + <function>socket_last_error</function> et + <function>socket_strerror</function>. + </para> + </refsect1> + </refentry> +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-send.xml diff -u phpdoc-fr/reference/sockets/functions/socket-send.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-send.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-send.xml:1.3 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/functions/socket-send.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,92 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-send"> <refnamediv> <refname>socket_send</refname> <refpurpose>Envoie des données à une socket connectée</refpurpose> </refnamediv> <refsect1> <title>Description</title> <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> <methodparam><type>int</type><parameter>flags</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> La fonction <function>socket_send</function> envoie <parameter>len</parameter> octets à la socket <parameter>socket</parameter> depuis le buffer <parameter>buf</parameter>. </para> <para> Le paramètre <parameter>flags</parameter> peut être la combinaison des valeurs suivantes : <table> <title>Valeurs possibles pour <parameter>flags</parameter></title> <tgroup cols="2"> <tbody> <row> <entry><literal>0x1</literal></entry> <entry> Traite les données OOB (out-of-band). </entry> </row> <row> <entry><literal>0x2</literal></entry> <entry> Traite le message entrant (peek). </entry> </row> <row> <entry><literal>0x4</literal></entry> <entry> Ignore le routage, utilise une interface directe. </entry> </row> <row> <entry><literal>0x8</literal></entry> <entry> Les données complètent l'enregistrement. </entry> </row> <row> <entry><literal>0x100</literal></entry> <entry> Les données complètent la transaction. </entry> </row> </tbody> </tgroup> </table> </para> <para> Voir aussi <function>socket_sendmsg</function> et <function>socket_sendto</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-send"> + <refnamediv> + <refname>socket_send</refname> + <refpurpose>Envoie des données à une socket connectée</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <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> + <methodparam><type>int</type><parameter>flags</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + La fonction <function>socket_send</function> envoie + <parameter>len</parameter> octets à la socket + <parameter>socket</parameter> depuis le buffer <parameter>buf</parameter>. + </para> + <para> + Le paramètre <parameter>flags</parameter> peut être la combinaison + des valeurs suivantes : + <table> + <title>Valeurs possibles pour <parameter>flags</parameter></title> + <tgroup cols="2"> + <tbody> + <row> + <entry><literal>0x1</literal></entry> + <entry> + Traite les données OOB (out-of-band). + </entry> + </row> + <row> + <entry><literal>0x2</literal></entry> + <entry> + Traite le message entrant (peek). + </entry> + </row> + <row> + <entry><literal>0x4</literal></entry> + <entry> + Ignore le routage, utilise une interface directe. + </entry> + </row> + <row> + <entry><literal>0x8</literal></entry> + <entry> + Les données complètent l'enregistrement. + </entry> + </row> + <row> + <entry><literal>0x100</literal></entry> + <entry> + Les données complètent la transaction. + </entry> + </row> + </tbody> + </tgroup> + </table> + </para> + <para> + Voir aussi + <function>socket_sendmsg</function> et + <function>socket_sendto</function>. + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-sendmsg.xml diff -u phpdoc-fr/reference/sockets/functions/socket-sendmsg.xml:1.2 phpdoc-fr/reference/sockets/functions/socket-sendmsg.xml:1.3 --- phpdoc-fr/reference/sockets/functions/socket-sendmsg.xml:1.2 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-sendmsg.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,45 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-sendmsg"> <refnamediv> <refname>socket_sendmsg</refname> <refpurpose>Envoie un message à une socket, qu'elle soit orientée connexion ou pas </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_sendmsg</methodname> <methodparam><type>resource</type><parameter>socket</parameter></methodparam> <methodparam><type>resource</type><parameter>iovec</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></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-sendmsg"> + <refnamediv> + <refname>socket_sendmsg</refname> + <refpurpose>Envoie un message à une socket, qu'elle soit orientée connexion ou pas </refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_sendmsg</methodname> + <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>resource</type><parameter>iovec</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></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-sendto.xml diff -u phpdoc-fr/reference/sockets/functions/socket-sendto.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-sendto.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-sendto.xml:1.3 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/functions/socket-sendto.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,116 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-sendto"> <refnamediv> <refname>socket_sendto</refname> <refpurpose> Envoie une message à une socket, qu'elle soit connectée ou pas </refpurpose> </refnamediv> <refsect1> <title>Description</title> <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> <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></methodparam> </methodsynopsis> &warn.experimental.func; <para> <function>socket_sendto</function> envoie <parameter>len</parameter> octets issus du buffer <parameter>buf</parameter> via la socket <parameter>socket</parameter>, vers le port <parameter>port</parameter>, à l'adresse <parameter>addr</parameter> </para> <para> Le paramètre <parameter>flags</parameter> peut prendre l'une des valeurs suivantes : <table> <title>Valeurs possibles pour <parameter>flags</parameter></title> <tgroup cols="2"> <tbody> <row> <entry><literal>0x1</literal></entry> <entry> Traite les données OOB (out-of-band). </entry> </row> <row> <entry><literal>0x2</literal></entry> <entry> Traite le message entrant (peek). </entry> </row> <row> <entry><literal>0x4</literal></entry> <entry> Ignore le routage, utilise une interface directe. </entry> </row> <row> <entry><literal>0x8</literal></entry> <entry> Les données complètent l'enregistrement. </entry> </row> <row> <entry><literal>0x100</literal></entry> <entry> Les données complètent la transaction. </entry> </row> </tbody> </tgroup> </table> </para> <example> <title>Exemple avec <function>socket_sendto</function></title> <programlisting role="php"><![CDATA[<?php $sh = socket_create(AF_INET,SOCK_STREAM,SOL_TCP); if (socket_bind($sh, '127.0.0.1', 4242)) { echo "Socket connectée correctement"; } $buf = 'Test Message'; $len = strlen($buf); if (socket_sendto($sh, $buf, $len, 0x100, '192.168.0.2', 4242) !== FALSE) { echo "Message envoyé correctement"; } socket_close($sh);?>]]> </programlisting> </example> <para> Voir aussi <function>socket_send</function> et <function>socket_sendmsg</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-sendto"> + <refnamediv> + <refname>socket_sendto</refname> + <refpurpose> + Envoie une message à une socket, qu'elle soit connectée ou pas + </refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <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> + <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></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + <function>socket_sendto</function> envoie <parameter>len</parameter> + octets issus du buffer <parameter>buf</parameter> via la socket + <parameter>socket</parameter>, vers le port <parameter>port</parameter>, + à l'adresse <parameter>addr</parameter> + </para> + <para> + Le paramètre <parameter>flags</parameter> peut prendre l'une des + valeurs suivantes : + <table> + <title>Valeurs possibles pour <parameter>flags</parameter></title> + <tgroup cols="2"> + <tbody> + <row> + <entry><literal>0x1</literal></entry> + <entry> + Traite les données OOB (out-of-band). + </entry> + </row> + <row> + <entry><literal>0x2</literal></entry> + <entry> + Traite le message entrant (peek). + </entry> + </row> + <row> + <entry><literal>0x4</literal></entry> + <entry> + Ignore le routage, utilise une interface directe. + </entry> + </row> + <row> + <entry><literal>0x8</literal></entry> + <entry> + Les données complètent l'enregistrement. + </entry> + </row> + <row> + <entry><literal>0x100</literal></entry> + <entry> + Les données complètent la transaction. + </entry> + </row> + </tbody> + </tgroup> + </table> + </para> + <example> + <title>Exemple avec <function>socket_sendto</function></title> + <programlisting role="php"> +<![CDATA[ +<?php + $sh = socket_create(AF_INET,SOCK_STREAM,SOL_TCP); + if (socket_bind($sh, '127.0.0.1', 4242)) { + echo "Socket connectée correctement"; + } + $buf = 'Test Message'; + $len = strlen($buf); + if (socket_sendto($sh, $buf, $len, 0x100, '192.168.0.2', 4242) !== FALSE) { + echo "Message envoyé correctement"; + } + socket_close($sh); +?> +]]> + </programlisting> + </example> + <para> + Voir aussi + <function>socket_send</function> et + <function>socket_sendmsg</function>. + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-set-nonblock.xml diff -u phpdoc-fr/reference/sockets/functions/socket-set-nonblock.xml:1.2 phpdoc-fr/reference/sockets/functions/socket-set-nonblock.xml:1.3 --- phpdoc-fr/reference/sockets/functions/socket-set-nonblock.xml:1.2 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-set-nonblock.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,41 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-set-nonblock"> <refnamediv> <refname>socket_set_nonblock</refname> <refpurpose>Sélectionne le mode non bloquant d'un descripteur de fichier</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_set_nonblock</methodname> <methodparam><type>resource</type><parameter>socket</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-set-nonblock"> + <refnamediv> + <refname>socket_set_nonblock</refname> + <refpurpose>Sélectionne le mode non bloquant d'un descripteur de fichier</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_set_nonblock</methodname> + <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-set-option.xml diff -u phpdoc-fr/reference/sockets/functions/socket-set-option.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-set-option.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-set-option.xml:1.3 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/functions/socket-set-option.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,50 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.3 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-set-option"> <refnamediv> <refname>socket_set_option</refname> <refpurpose>Modifie les options de socket</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_set_option</methodname> <methodparam><type>resource</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> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> <note> <para> Cette fonction était appelée <literal>socket_setopt()</literal> avant PHP 4.3.0. </para> </note> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.3 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-set-option"> + <refnamediv> + <refname>socket_set_option</refname> + <refpurpose>Modifie les options de socket</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_set_option</methodname> + <methodparam><type>resource</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> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + <note> + <para> + Cette fonction était appelée <literal>socket_setopt()</literal> avant + PHP 4.3.0. + </para> + </note> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-shutdown.xml diff -u phpdoc-fr/reference/sockets/functions/socket-shutdown.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-shutdown.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-shutdown.xml:1.3 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/functions/socket-shutdown.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,72 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-shutdown"> <refnamediv> <refname>socket_shutdown</refname> <refpurpose>Eteind une socket en lecture et/ou écriture</refpurpose> </refnamediv> <refsect1> <title>Description</title> <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></methodparam> </methodsynopsis> &warn.experimental.func; <para> <function>socket_shutdown</function> vous permet d'empêcher les données entrantes ou sortantes ou les deux (par défaut), d'être émise via la socket <parameter>socket</parameter> </para> <para> La valeur de <parameter>how</parameter> peut être l'une des suivantes : <table> <title>Valeurs possibles pour <parameter>how</parameter></title> <tgroup cols="2"> <tbody> <row> <entry><literal>0</literal></entry> <entry> Empêche la lecture de la socket </entry> </row> <row> <entry><literal>1</literal></entry> <entry> Empêche l'écriture de la socket </entry> </row> <row> <entry><literal>2</literal></entry> <entry> Empêche l'écriture et la lecture de la socket </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-shutdown"> + <refnamediv> + <refname>socket_shutdown</refname> + <refpurpose>Eteind une socket en lecture et/ou écriture</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <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></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + <function>socket_shutdown</function> vous permet d'empêcher les données + entrantes ou sortantes ou les deux (par défaut), d'être émise via + la socket <parameter>socket</parameter> + </para> + <para> + La valeur de <parameter>how</parameter> peut être l'une des suivantes : + <table> + <title>Valeurs possibles pour <parameter>how</parameter></title> + <tgroup cols="2"> + <tbody> + <row> + <entry><literal>0</literal></entry> + <entry> + Empêche la lecture de la socket + </entry> + </row> + <row> + <entry><literal>1</literal></entry> + <entry> + Empêche l'écriture de la socket + </entry> + </row> + <row> + <entry><literal>2</literal></entry> + <entry> + Empêche l'écriture et la lecture de la socket + </entry> + </row> + </tbody> + </tgroup> + </table> + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-strerror.xml diff -u phpdoc-fr/reference/sockets/functions/socket-strerror.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-strerror.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-strerror.xml:1.3 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/functions/socket-strerror.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,81 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.4 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.8 --> <refentry id="function.socket-strerror"> <refnamediv> <refname>socket_strerror</refname> <refpurpose>Retourne une chaîne décrivant un message d'erreur</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>string</type><methodname>socket_strerror</methodname> <methodparam><type>int</type><parameter>errno</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> <function>socket_strerror</function> prend un code d'erreur comme paramètre <parameter>errno</parameter>. Cette valeur est souvent retournée par la fonction <function>socket_last_error</function>. La fonction retourne le message d'erreur correspondant. Cela rend plus facile la compréhension des problèmes survenus. Par exemple, au lieu d'avoir à rechercher un fichier système dans lequel il y a l'explication de '-111', vous avez juste à le passer à <function>socket_strerror</function>, qui vous dira ce qui c'est passé. </para> <para> <example> <title>Exemple avec <function>socket_strerror</function></title> <programlisting role="php"><![CDATA[<?phpif (false == ($socket = @socket_create(AF_INET, SOCK_STREAM, 0))) { echo "socket_create() a échoué : raison : " . socket_strerror(socket_last_error()) . "\n";} if (false == (@socket_bind($socket, '127.0.0.1', 80))) { echo "socket_bind() a échoué : raison : " . socket_strerror(socket_last_error($socket)) . "\n";}?>]]> </programlisting> <para> L'affichage attendu pour l'exemple du dessus (en supposant que vous essayer d'exécuter le script sans les droits de root) : <screen> socket_bind() a échoué : raison : Permission denied </screen> </para> </example> </para> <para> Voir aussi <function>socket_accept</function>, <function>socket_bind</function>, <function>socket_connect</function>, <function>socket_listen</function> et <function>socket_create</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.4 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.8 --> + <refentry id="function.socket-strerror"> + <refnamediv> + <refname>socket_strerror</refname> + <refpurpose>Retourne une chaîne décrivant un message d'erreur</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>string</type><methodname>socket_strerror</methodname> + <methodparam><type>int</type><parameter>errno</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + <function>socket_strerror</function> prend un code d'erreur comme paramètre + <parameter>errno</parameter>. Cette valeur est souvent retournée par la + fonction <function>socket_last_error</function>. La fonction retourne + le message d'erreur correspondant. Cela rend plus facile la compréhension + des problèmes survenus. Par exemple, au lieu d'avoir à rechercher + un fichier système dans lequel il y a l'explication de '-111', + vous avez juste à le passer à <function>socket_strerror</function>, qui + vous dira ce qui c'est passé. + </para> + <para> + <example> + <title>Exemple avec <function>socket_strerror</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +if (false == ($socket = @socket_create(AF_INET, SOCK_STREAM, 0))) { + echo "socket_create() a échoué : raison : " . socket_strerror(socket_last_error()) . "\n"; +} + +if (false == (@socket_bind($socket, '127.0.0.1', 80))) { + echo "socket_bind() a échoué : raison : " . socket_strerror(socket_last_error($socket)) . "\n"; +} +?> +]]> + </programlisting> + <para> + L'affichage attendu pour l'exemple du dessus (en supposant que + vous essayer d'exécuter le script sans les droits de root) : + <screen> + socket_bind() a échoué : raison : Permission denied + </screen> + </para> + </example> + </para> + <para> + Voir aussi + <function>socket_accept</function>, + <function>socket_bind</function>, + <function>socket_connect</function>, + <function>socket_listen</function> et + <function>socket_create</function>. + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-write.xml diff -u phpdoc-fr/reference/sockets/functions/socket-write.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-write.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-write.xml:1.3 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/functions/socket-write.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,88 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.3 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-write"> <refnamediv> <refname>socket_write</refname> <refpurpose>Ecrit dans une socket</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</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></methodparam> </methodsynopsis> &warn.experimental.func; <para> <function>socket_write</function> écrit dans la socket <parameter>socket</parameter> les données du buffer <parameter>buffer</parameter>. </para> <para> Le paramètre optionnel <parameter>length</parameter> peut spécifier explicitement la taille des données qui doivent être écrites. Si cette longueur est plus grande que la taille du buffer, elle sera ramenée automatiquemetn à la taille du buffer lui-même. </para> <para> <function>socket_write</function> retourne le nombre d'octets qui ont pus êter écrits dans la socket, ou bien &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. </para> <note> <para> <function>socket_write</function> n'écrit pas nécessaire tous les octets du buffer fourni. Il est valide que, suivant certaines configuration de buffer réseau, que seulement une certaine quantité de données, même un octets, soit écrit, même si votre buffer est plus grand. Vous devez alors vous assurer que vous n'avez pas oublié de transmettre le reste de vos données. </para> </note> <note> <para> Il est parfaitement valide pour <function>socket_write</function> de retourner zéro, ce qui signifie qu'aucun octet n'a été écrit. Soyez bien sûr d'utiliser l'opérateur <literal>===</literal> pour comparer le retour de la fonction avec &false;, et détecter un cas d'erreur. </para> </note> <para> Voir aussi <function>socket_accept</function>, <function>socket_bind</function>, <function>socket_connect</function>, <function>socket_listen</function>, <function>socket_read</function> et <function>socket_strerror</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.3 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-write"> + <refnamediv> + <refname>socket_write</refname> + <refpurpose>Ecrit dans une socket</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>int</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></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + <function>socket_write</function> écrit dans la socket + <parameter>socket</parameter> les données du buffer + <parameter>buffer</parameter>. + </para> + <para> + Le paramètre optionnel <parameter>length</parameter> peut spécifier + explicitement la taille des données qui doivent être écrites. Si cette + longueur est plus grande que la taille du buffer, elle sera ramenée + automatiquemetn à la taille du buffer lui-même. + </para> + <para> + <function>socket_write</function> retourne le nombre d'octets qui ont + pus êter écrits dans la socket, ou bien &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. + </para> + <note> + <para> + <function>socket_write</function> n'écrit pas nécessaire tous + les octets du buffer fourni. Il est valide que, suivant certaines + configuration de buffer réseau, que seulement une certaine quantité + de données, même un octets, soit écrit, même si votre buffer + est plus grand. Vous devez alors vous assurer que vous n'avez + pas oublié de transmettre le reste de vos données. + </para> + </note> + <note> + <para> + Il est parfaitement valide pour <function>socket_write</function> de + retourner zéro, ce qui signifie qu'aucun octet n'a été écrit. Soyez + bien sûr d'utiliser l'opérateur <literal>===</literal> pour + comparer le retour de la fonction avec &false;, et détecter un + cas d'erreur. + </para> + </note> + <para> + Voir aussi + <function>socket_accept</function>, + <function>socket_bind</function>, + <function>socket_connect</function>, + <function>socket_listen</function>, + <function>socket_read</function> et + <function>socket_strerror</function>. + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-writev.xml diff -u phpdoc-fr/reference/sockets/functions/socket-writev.xml:1.2 phpdoc-fr/reference/sockets/functions/socket-writev.xml:1.3 --- phpdoc-fr/reference/sockets/functions/socket-writev.xml:1.2 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-writev.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,42 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-writev"> <refnamediv> <refname>socket_writev</refname> <refpurpose>Ecrit des données dans un descripteur de fichier, fd, en utilisant le tableau scatter-gather définie par iovec_id </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_writev</methodname> <methodparam><type>resource</type><parameter>socket</parameter></methodparam> <methodparam><type>resource</type><parameter>iovec_id</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-writev"> + <refnamediv> + <refname>socket_writev</refname> + <refpurpose>Ecrit des données dans un descripteur de fichier, fd, en utilisant le tableau scatter-gather définie par iovec_id </refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_writev</methodname> + <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>resource</type><parameter>iovec_id</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +-->
Index: phpdoc-fr/reference/sockets/reference.xml diff -u phpdoc-fr/reference/sockets/reference.xml:1.5 phpdoc-fr/reference/sockets/reference.xml:1.6 --- phpdoc-fr/reference/sockets/reference.xml:1.5 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/reference.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,254 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.5 $ --> <reference id="ref.sockets"> <title>Socket</title> <titleabbrev>Sockets</titleabbrev> <partintro> <section id="sockets.intro"> &reftitle.intro; <simpara> L'extension socket implémente une interface bas niveau avec les fonctions de communication par socket, basées sur les sockets BSD si populaires, et fournit la possibilité de fonctionner aussi bien sous forme de client que de serveur. </simpara> <para> Pour une interface socket cliente plus générique, voyez <function>fsockopen</function> et <function>pfsockopen</function>. </para> <para> Lorsque vous utilisez ces fonctions, il est important de vous rappeler que si de nombreuses fonctions ont le même nom que leur alter ego en langage C, elles ont souvent des déclarations différentes. Lisez attentivement les descriptions pour éviter des confusions. </para> <para> Cela dit, ceux qui ne sont pas familiers avec la programmation par socket peuvent toujours trouver beaucoup de documentation dans les pages de manuel Unix appropriées, et il y a une grande quantité d'introductions en langage C sur le web, qui peuvent être facilement réutilisés, avec des adaptations mineures. <ulink url="&url.socket.faq;">UNIX Socket FAQ</ulink> est un bon début. </para> &warn.experimental; </section> <section id="sockets.requirements"> &reftitle.required; &no.requirement; </section> &reference.sockets.configure; <section id="sockets.configuration"> &reftitle.runtime; &no.config; </section> <section id="sockets.resources"> &reftitle.resources; &no.resource; </section> &reference.sockets.constants; <section id="sockets.errors"> <title>Socket Errors</title> <para> L'extension socket a été écrite pour fournir une interface utilisable avec les puissantes sockets fournies par BSD. Un soin particulier a été apporté pour que les fonctions soient aussi efficaces sous Unix que sous Windows32. Presque toutes les fonctions de sockets peuvent échouer dans certaines circonstances, et émettent ainsi un message d'alerte <constant>E_WARNING</constant> décrivant l'erreur. Parfois, cela ne se fait pas selon les souhaits du développeur. Par exemple, la fonction <function>socket_read</function> peut tout à coup émettre un message <constant>E_WARNING</constant> car la connexion a été inopinément interrompu. Il est commun de supprimer les erreurs avec l'opérateur <literal>@</literal> et de traiter les erreurs avec la fonction <function>socket_last_error</function>, au niveau application. Vous pouvez appeler <function>socket_strerror</function> avec le code d'erreur pour connaître le message d'erreur, humainement lisible. Reportez vous à leur description pour plus de détails. </para> <note> <para> Les messages <constant>E_WARNING</constant> généré par l'extension socket sont en anglais, mais le message d'erreur s'affichera en fonction de la configuration locale (<constant>LC_MESSAGES</constant>): <programlisting role="php"><![CDATA[Warning - socket_bind() unable to bind address [98]: Die Adresse wird bereits verwendet]]> </programlisting> </para> </note> </section> <section id="sockets.examples"> &reftitle.examples; <para> <example> <title>Exemple de socket : serveur TCP/IP simple</title> <para> Cet exemple montre comment créer un serveur simple. Changez les variables <varname>address</varname> et <varname>port</varname> pour vous adapter à votre configuration, et exécutez le. Vous pourrez alors vous connecter au serveur avec une commande comme ceci : <command>telnet 192.168.1.53 10000</command> (en supposant que l'adresse et le port correspondent à votre configuration). Tout ce que vous saisissez après cela sera envoyé au serveur, et affiché en retour. Pour vous déconnecter, tapez 'quit'. <programlisting role="php"><![CDATA[#!/usr/local/bin/php -q<?phperror_reporting (E_ALL);/* Autorise l'éxécution infinie du script, en attente de connexion. */set_time_limit (0);/* Active le vidage implicite des buffers de sortie, pour que nous * puissions vois ce que nous lisons au fur et a mesure. */ob_implicit_flush ();$address = '192.168.1.53';$port = 10000;if (($sock = socket_create (AF_INET, SOCK_STREAM, 0)) < 0) { echo "socket_create() a échoué : raison : " . socket_strerror ($sock) . "\n";}if (($ret = socket_bind ($sock, $address, $port)) < 0) { echo "socket_bind() a échoué : raison : " . socket_strerror ($ret) . "\n";}if (($ret = socket_listen ($sock, 5)) < 0) { echo "socket_listen() a échoué : raison : " . socket_strerror ($ret) . "\n";}do { if (($msgsock = socket_accept($sock)) < 0) { echo "socket_accept() a échoué : raison : " . socket_strerror ($msgsock) . "\n"; break; } /* Send instructions. */ $msg = "\Bienvenue sur le serveur de test PHP.\n" . "Pour quitter, tapez 'quit'. Pour éteindre le serveur, tapez 'shutdown'.\n"; socket_write($msgsock, $msg, strlen($msg)); do { if (FALSE === ($buf = socket_read ($msgsock, 2048))) { echo "socket_read() a échoué : raison : " . socket_strerror ($ret) . "\n"; break 2; } if (!$buf = trim ($buf)) { continue; } if ($buf == 'quit') { break; } if ($buf == 'shutdown') { socket_close ($msgsock); break 2; } $talkback = "PHP: You said '$buf'.\n"; socket_write ($msgsock, $talkback, strlen ($talkback)); echo "$buf\n"; } while (true); socket_close ($msgsock);} while (true);socket_close ($sock);?>]]> </programlisting> </para> </example> </para> <para> <example> <title>Exemple avec les sockets : Client TCP/IP simple</title> <para> Ce exemple illustre un client HTTP simple. Il se connecte simplement à une page, envoie une requête HEAD, affiche le résultat, et se termine. </para> <programlisting><![CDATA[<?phperror_reporting (E_ALL);echo "<h2>Connexion TCP/IP</h2>\n";/* Lit le port du service WWW. */$service_port = getservbyname ('www', 'tcp');/* Lit l'adresse IP du serveur de destination */$address = gethostbyname ('www.exemple.com');/* Cree une socket TCP/IP. */$socket = socket_create (AF_INET, SOCK_STREAM, 0);if ($socket < 0) { echo "socket_create() a échoué : raison : " . socket_strerror ($socket) . "\n";} else { echo "OK.\n";}echo "Essai de connexion à '$address' sur le port '$service_port'...";$result = socket_connect ($socket, $address, $service_port);if ($result < 0) { echo "socket_connect() a échoué : raison : ($result) " . socket_strerror($result) . "\n";} else { echo "OK.\n";}$in = "HEAD / HTTP/1.0\r\n\r\n";$out = '';echo "Envoi de la requête HTTP HEAD...";socket_write ($socket, $in, strlen ($in));echo "OK.\n";echo "Lire la réponse : \n\n";while ($out = socket_read ($socket, 2048)) { echo $out;}echo "Fermeture de la socket...";socket_close ($socket);echo "OK.\n\n";?>]]> </programlisting> </example> </para> </section> </partintro>&reference.sockets.functions; </reference><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.6 $ --> + <reference id="ref.sockets"> + <title>Socket</title> + <titleabbrev>Sockets</titleabbrev> + + <partintro> + <section id="sockets.intro"> + &reftitle.intro; + <simpara> + L'extension socket implémente une interface bas niveau avec les fonctions + de communication par socket, basées sur les sockets BSD si populaires, + et fournit la possibilité de fonctionner aussi bien sous forme de client + que de serveur. + </simpara> + <para> + Pour une interface socket cliente plus générique, voyez + <function>fsockopen</function> et <function>pfsockopen</function>. + </para> + <para> + Lorsque vous utilisez ces fonctions, il est important de vous + rappeler que si de nombreuses fonctions ont le même nom que leur + alter ego en langage C, elles ont souvent des déclarations différentes. + Lisez attentivement les descriptions pour éviter des confusions. + </para> + <para> + Cela dit, ceux qui ne sont pas familiers avec la programmation par socket + peuvent toujours trouver beaucoup de documentation dans les pages de + manuel Unix appropriées, et il y a une grande quantité d'introductions + en langage C sur le web, qui peuvent être facilement réutilisés, avec + des adaptations mineures. + <ulink url="&url.socket.faq;">UNIX Socket FAQ</ulink> + est un bon début. + </para> + &warn.experimental; + </section> + + <section id="sockets.requirements"> + &reftitle.required; + &no.requirement; + </section> + + &reference.sockets.configure; + + <section id="sockets.configuration"> + &reftitle.runtime; + &no.config; + </section> + + <section id="sockets.resources"> + &reftitle.resources; + &no.resource; + </section> + + &reference.sockets.constants; + + <section id="sockets.errors"> + <title>Socket Errors</title> + <para> + L'extension socket a été écrite pour fournir une interface utilisable + avec les puissantes sockets fournies par BSD. Un soin particulier a été + apporté pour que les fonctions soient aussi efficaces sous Unix que sous + Windows32. Presque toutes les fonctions de sockets peuvent échouer + dans certaines circonstances, et émettent ainsi un message d'alerte + <constant>E_WARNING</constant> décrivant l'erreur. Parfois, cela ne + se fait pas selon les souhaits du développeur. Par exemple, la fonction + <function>socket_read</function> peut tout à coup émettre un + message <constant>E_WARNING</constant> car la connexion a été + inopinément interrompu. Il est commun de supprimer les erreurs avec + l'opérateur <literal>@</literal> et de traiter les erreurs avec la + fonction <function>socket_last_error</function>, au niveau application. + Vous pouvez appeler <function>socket_strerror</function> avec le code + d'erreur pour connaître le message d'erreur, humainement lisible. + Reportez vous à leur description pour plus de détails. + </para> + <note> + <para> + Les messages <constant>E_WARNING</constant> généré par l'extension + socket sont en anglais, mais le message d'erreur s'affichera en fonction + de la configuration locale (<constant>LC_MESSAGES</constant>): + <programlisting role="php"> +<![CDATA[ +Warning - socket_bind() unable to bind address [98]: Die Adresse wird bereits verwendet +]]> + </programlisting> + </para> + </note> + </section> + + <section id="sockets.examples"> + &reftitle.examples; + <para> + <example> + <title>Exemple de socket : serveur TCP/IP simple</title> + <para> + Cet exemple montre comment créer un serveur simple. + Changez les variables <varname>address</varname> et + <varname>port</varname> pour vous adapter à votre configuration, + et exécutez le. Vous pourrez alors vous connecter au serveur + avec une commande comme ceci : <command>telnet 192.168.1.53 + 10000</command> (en supposant que l'adresse et le port correspondent + à votre configuration). Tout ce que vous saisissez après cela sera + envoyé au serveur, et affiché en retour. Pour vous déconnecter, + tapez 'quit'. + <programlisting role="php"> +<![CDATA[ +#!/usr/local/bin/php -q +<?php +error_reporting (E_ALL); + +/* Autorise l'éxécution infinie du script, en attente de connexion. */ +set_time_limit (0); + +/* Active le vidage implicite des buffers de sortie, pour que nous + * puissions vois ce que nous lisons au fur et a mesure. */ +ob_implicit_flush (); + +$address = '192.168.1.53'; +$port = 10000; + +if (($sock = socket_create (AF_INET, SOCK_STREAM, 0)) < 0) { + echo "socket_create() a échoué : raison : " . socket_strerror ($sock) . "\n"; +} + +if (($ret = socket_bind ($sock, $address, $port)) < 0) { + echo "socket_bind() a échoué : raison : " . socket_strerror ($ret) . "\n"; +} + +if (($ret = socket_listen ($sock, 5)) < 0) { + echo "socket_listen() a échoué : raison : " . socket_strerror ($ret) . "\n"; +} + +do { + if (($msgsock = socket_accept($sock)) < 0) { + echo "socket_accept() a échoué : raison : " . socket_strerror ($msgsock) . "\n"; + break; + } + /* Send instructions. */ + $msg = "\Bienvenue sur le serveur de test PHP.\n" . + "Pour quitter, tapez 'quit'. Pour éteindre le serveur, tapez 'shutdown'.\n"; + socket_write($msgsock, $msg, strlen($msg)); + + do { + if (FALSE === ($buf = socket_read ($msgsock, 2048))) { + echo "socket_read() a échoué : raison : " . socket_strerror ($ret) . "\n"; + break 2; + } + if (!$buf = trim ($buf)) { + continue; + } + if ($buf == 'quit') { + break; + } + if ($buf == 'shutdown') { + socket_close ($msgsock); + break 2; + } + $talkback = "PHP: You said '$buf'.\n"; + socket_write ($msgsock, $talkback, strlen ($talkback)); + echo "$buf\n"; + } while (true); + socket_close ($msgsock); +} while (true); + +socket_close ($sock); +?> +]]> + </programlisting> + </para> + </example> + </para> + <para> + <example> + <title>Exemple avec les sockets : Client TCP/IP simple</title> + <para> + Ce exemple illustre un client HTTP simple. Il se connecte simplement + à une page, envoie une requête HEAD, affiche le résultat, et se termine. + </para> + <programlisting> +<![CDATA[ +<?php +error_reporting (E_ALL); + +echo "<h2>Connexion TCP/IP</h2>\n"; + +/* Lit le port du service WWW. */ +$service_port = getservbyname ('www', 'tcp'); + +/* Lit l'adresse IP du serveur de destination */ +$address = gethostbyname ('www.exemple.com'); + +/* Cree une socket TCP/IP. */ +$socket = socket_create (AF_INET, SOCK_STREAM, 0); +if ($socket < 0) { + echo "socket_create() a échoué : raison : " . socket_strerror ($socket) . "\n"; +} else { + echo "OK.\n"; +} + +echo "Essai de connexion à '$address' sur le port '$service_port'..."; +$result = socket_connect ($socket, $address, $service_port); +if ($result < 0) { + echo "socket_connect() a échoué : raison : ($result) " . socket_strerror($result) . "\n"; +} else { + echo "OK.\n"; +} + +$in = "HEAD / HTTP/1.0\r\n\r\n"; +$out = ''; + +echo "Envoi de la requête HTTP HEAD..."; +socket_write ($socket, $in, strlen ($in)); +echo "OK.\n"; + +echo "Lire la réponse : \n\n"; +while ($out = socket_read ($socket, 2048)) { + echo $out; +} + +echo "Fermeture de la socket..."; +socket_close ($socket); +echo "OK.\n\n"; +?> +]]> + </programlisting> + </example> + </para> + </section> + </partintro> + +&reference.sockets.functions; + + </reference> +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> + Index: phpdoc-fr/reference/sockets/functions/socket-accept.xml diff -u phpdoc-fr/reference/sockets/functions/socket-accept.xml:1.2 phpdoc-fr/reference/sockets/functions/socket-accept.xml:1.3 --- phpdoc-fr/reference/sockets/functions/socket-accept.xml:1.2 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-accept.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,78 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.3 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.1 --> <refentry id="function.socket-accept"> <refnamediv> <refname>socket_accept</refname> <refpurpose>Accepte une connexion sur une socket</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>resource</type><methodname>socket_accept</methodname> <methodparam><type>resource</type><parameter>socket</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> Une fois que la socket <parameter>socket</parameter> a été créée avec la fonction <function>socket_create</function>, liée à un nom avec la fonction <function>socket_bind</function>, et mise en attente de connexion avec la fonction <function>socket_listen</function>, <function>socket_accept</function> va accepter les connexions sur cette socket. Une fois qu'une connexion est faite, une nouvelle ressource de socket est retournée. Elle peut etre 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 <parameter>socket</parameter> a été rendue non-bloquante, grâce à <function>socket_set_blocking</function> ou <function>socket_set_nonblock</function>, &false; sera retourné. </para> <para> La ressource de socket retournée par <function>socket_accept</function> ne doit pas être utilisée pour accepter de nouvelles connexions. La socket originale <parameter>socket</parameter>, qui est en attente, reste ouverte et peut être réutilisée. </para> <para> <function>socket_listen</function> retourne une nouvelle ressource de socket 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 d'erreur, humainement lisible. </para> <para> Voir aussi <function>socket_bind</function>, <function>socket_connect</function>, <function>socket_listen</function>, <function>socket_create</function> et <function>socket_strerror</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.3 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.1 --> + <refentry id="function.socket-accept"> + <refnamediv> + <refname>socket_accept</refname> + <refpurpose>Accepte une connexion sur une socket</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>resource</type><methodname>socket_accept</methodname> + <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + Une fois que la socket <parameter>socket</parameter> a été créée + avec la fonction <function>socket_create</function>, liée à + un nom avec la fonction <function>socket_bind</function>, et + mise en attente de connexion avec la fonction + <function>socket_listen</function>, <function>socket_accept</function> + va accepter les connexions sur cette socket. Une fois qu'une + connexion est faite, une nouvelle ressource de socket est + retournée. Elle peut etre 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 <parameter>socket</parameter> + a été rendue non-bloquante, grâce à + <function>socket_set_blocking</function> ou + <function>socket_set_nonblock</function>, &false; sera retourné. + </para> + <para> + La ressource de socket retournée par + <function>socket_accept</function> ne doit pas être utilisée + pour accepter de nouvelles connexions. La socket originale + <parameter>socket</parameter>, qui est en attente, reste ouverte + et peut être réutilisée. + </para> + <para> + <function>socket_listen</function> retourne une nouvelle ressource + de socket 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 d'erreur, humainement lisible. + </para> + <para> + Voir aussi + <function>socket_bind</function>, + <function>socket_connect</function>, + <function>socket_listen</function>, + <function>socket_create</function> et + <function>socket_strerror</function>. + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-bind.xml diff -u phpdoc-fr/reference/sockets/functions/socket-bind.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-bind.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-bind.xml:1.3 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/functions/socket-bind.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,74 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.4 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.3 --> <refentry id="function.socket-bind"> <refnamediv> <refname>socket_bind</refname> <refpurpose>Lie un nom à une socket</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_bind</methodname> <methodparam><type>resource</type><parameter>socket</parameter></methodparam> <methodparam><type>string</type><parameter>address</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>port</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> <function>socket_bind</function> lie le nom donné par <parameter>address</parameter> à la socket décrite par <parameter>socket</parameter>, qui doit être une ressource de socket valide, créée par <function>socket_create</function>. </para> <para> Le paramètre d'adresse <parameter>address</parameter> peut être soit une adresse IP numérique (i.e. <literal>127.0.0.1</literal>), si la socket est de la famille <constant>AF_INET</constant>; ou bien le chemin d'une socket de domaine Unix, si la socket est de la famille <constant>AF_UNIX</constant>. </para> <para> Le paramètre <parameter>port</parameter> n'est utilisé que lors de la connexion à une socket de type <constant>AF_INET</constant>, et désigne le port sur l'hôte distant, sur lequel une connexion doit être faite. </para> <para> &return.success; 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> <para> Voir aussi <function>socket_connect</function>, <function>socket_listen</function>, <function>socket_create</function>, <function>socket_last_error</function> et <function>socket_strerror</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.4 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.3 --> + <refentry id="function.socket-bind"> + <refnamediv> + <refname>socket_bind</refname> + <refpurpose>Lie un nom à une socket</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_bind</methodname> + <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>string</type><parameter>address</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>port</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + <function>socket_bind</function> lie le nom donné par + <parameter>address</parameter> à la socket décrite par + <parameter>socket</parameter>, qui doit être une ressource + de socket valide, créée par <function>socket_create</function>. + </para> + <para> + Le paramètre d'adresse <parameter>address</parameter> peut + être soit une adresse IP numérique (i.e. <literal>127.0.0.1</literal>), + si la socket est de la famille <constant>AF_INET</constant>; + ou bien le chemin d'une socket de domaine Unix, si la socket + est de la famille <constant>AF_UNIX</constant>. + </para> + <para> + Le paramètre <parameter>port</parameter> n'est utilisé que lors + de la connexion à une socket de type <constant>AF_INET</constant>, + et désigne le port sur l'hôte distant, sur lequel une connexion + doit être faite. + </para> + <para> + &return.success; 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> + <para> + Voir aussi + <function>socket_connect</function>, + <function>socket_listen</function>, + <function>socket_create</function>, + <function>socket_last_error</function> et + <function>socket_strerror</function>. + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-clear-error.xml diff -u phpdoc-fr/reference/sockets/functions/socket-clear-error.xml:1.2 phpdoc-fr/reference/sockets/functions/socket-clear-error.xml:1.3 --- phpdoc-fr/reference/sockets/functions/socket-clear-error.xml:1.2 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-clear-error.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,53 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.4 $ --> <refentry id="function.socket-clear-error"> <refnamediv> <refname>socket_clear_error</refname> <refpurpose>Efface toutes les erreurs précédemment générées par une socket</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>void</type><methodname>socket_clear_error</methodname> <methodparam choice="opt"><type>resource</type><parameter>socket</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> <function>socket_clear_error</function> efface tous les codes d'erreurs qui ont été enregistrés pour la socket <parameter>socket</parameter>, ou bien pour la socket générale. </para> <para> <function>socket_clear_error</function> permet de remettre à zéro les codes d'erreurs d'une socket ou de la socket globale. Cela peut être utile pour détecter l'avénement d'une erreur durant une partie de l'applcation. </para> <para> Voir aussi <function>socket_last_error</function> et <function>socket_strerror</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.4 $ --> + <refentry id="function.socket-clear-error"> + <refnamediv> + <refname>socket_clear_error</refname> + <refpurpose>Efface toutes les erreurs précédemment générées par une socket</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>void</type><methodname>socket_clear_error</methodname> + <methodparam choice="opt"><type>resource</type><parameter>socket</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + <function>socket_clear_error</function> efface tous les codes d'erreurs + qui ont été enregistrés pour la socket <parameter>socket</parameter>, + ou bien pour la socket générale. + </para> + <para> + <function>socket_clear_error</function> permet de remettre à zéro les + codes d'erreurs d'une socket ou de la socket globale. Cela peut être + utile pour détecter l'avénement d'une erreur durant une partie de + l'applcation. + </para> + <para> + Voir aussi + <function>socket_last_error</function> et + <function>socket_strerror</function>. + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-close.xml diff -u phpdoc-fr/reference/sockets/functions/socket-close.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-close.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-close.xml:1.3 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/functions/socket-close.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,61 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.3 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.1 --> <refentry id="function.socket-close"> <refnamediv> <refname>socket_close</refname> <refpurpose>Ferme une socket</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>void</type><methodname>socket_close</methodname> <methodparam><type>resource</type><parameter>socket</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> <function>socket_close</function> ferme la socket <parameter>socket</parameter>, et détruit toutes les ressources qui y sont liées. </para> <note> <para> <function>socket_close</function> ne peut pas être utilisée sur les ressources de fichiers créées par <function>fopen</function>, <function>popen</function>, <function>fsockopen</function>, ou <function>psockopen</function>; cette fonction est destinée à traiter les sockets créées par les fonctions <function>socket_create</function> ou <function>socket_accept</function>. </para> </note> <para> Voir aussi <function>socket_bind</function>, <function>socket_listen</function>, <function>socket_create</function> et <function>socket_strerror</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.3 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.1 --> + <refentry id="function.socket-close"> + <refnamediv> + <refname>socket_close</refname> + <refpurpose>Ferme une socket</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>void</type><methodname>socket_close</methodname> + <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + <function>socket_close</function> ferme la socket + <parameter>socket</parameter>, et détruit toutes les + ressources qui y sont liées. + </para> + <note> + <para> + <function>socket_close</function> ne peut pas être utilisée + sur les ressources de fichiers créées par + <function>fopen</function>, <function>popen</function>, + <function>fsockopen</function>, ou <function>psockopen</function>; + cette fonction est destinée à traiter les sockets créées par les + fonctions <function>socket_create</function> ou + <function>socket_accept</function>. + </para> + </note> + <para> + Voir aussi + <function>socket_bind</function>, + <function>socket_listen</function>, + <function>socket_create</function> et + <function>socket_strerror</function>. + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-connect.xml diff -u phpdoc-fr/reference/sockets/functions/socket-connect.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-connect.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-connect.xml:1.3 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/functions/socket-connect.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,74 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.4 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.1 --> <refentry id="function.socket-connect"> <refnamediv> <refname>socket_connect</refname> <refpurpose>Crée une connexion sur une socket</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_connect</methodname> <methodparam><type>resource</type><parameter>socket</parameter></methodparam> <methodparam><type>string</type><parameter>address</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>port</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> <function>socket_connect</function> 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>. </para> <para> Le paramètre d'adresse <parameter>address</parameter> peut être soit une adresse IP numérique (i.e. <literal>127.0.0.1</literal>), si la socket est de la famille <constant>AF_INET</constant>; ou bien le chemin d'une socket de domaine Unix, si la socket est de la famille <constant>AF_UNIX</constant>. </para> <para> Le paramètre <parameter>port</parameter> n'est utilisé que lors de la connexion à une socket de type <constant>AF_INET</constant>, et désigne le port sur l'hôte distant, sur lequel une connexion doit être faite. </para> <para> &return.success; 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> <para> Voir aussi <function>socket_bind</function>, <function>socket_listen</function>, <function>socket_create</function>, <function>socket_last_error</function> et <function>socket_strerror</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.4 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.1 --> + <refentry id="function.socket-connect"> + <refnamediv> + <refname>socket_connect</refname> + <refpurpose>Crée une connexion sur une socket</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_connect</methodname> + <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>string</type><parameter>address</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>port</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + <function>socket_connect</function> 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>. + </para> + <para> + Le paramètre d'adresse <parameter>address</parameter> peut + être soit une adresse IP numérique (i.e. <literal>127.0.0.1</literal>), + si la socket est de la famille <constant>AF_INET</constant>; + ou bien le chemin d'une socket de domaine Unix, si la socket + est de la famille <constant>AF_UNIX</constant>. + </para> + <para> + Le paramètre <parameter>port</parameter> n'est utilisé que lors + de la connexion à une socket de type <constant>AF_INET</constant>, + et désigne le port sur l'hôte distant, sur lequel une connexion + doit être faite. + </para> + <para> + &return.success; 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> + <para> + Voir aussi + <function>socket_bind</function>, + <function>socket_listen</function>, + <function>socket_create</function>, + <function>socket_last_error</function> et + <function>socket_strerror</function>. + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-create-listen.xml diff -u phpdoc-fr/reference/sockets/functions/socket-create-listen.xml:1.2 phpdoc-fr/reference/sockets/functions/socket-create-listen.xml:1.3 --- phpdoc-fr/reference/sockets/functions/socket-create-listen.xml:1.2 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-create-listen.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,81 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.3 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-create-listen"> <refnamediv> <refname>socket_create_listen</refname> <refpurpose>Ouvre une socket sur un port pour accepter les connexions</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>resource</type><methodname>socket_create_listen</methodname> <methodparam><type>int</type><parameter>port</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>backlog</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> <function>socket_create_listen</function> est destinée à simplifier la création de nouvelles sockets destinées être mises en attente, et accepter de nouvelles connexions. </para> <para> <function>socket_create_listen</function> créée une nouvelle ressource de socket, de type <constant>AF_INET</constant>, mise en attente sur <emphasis>toutes</emphasis> les interfaces locales, pour le port <parameter>port</parameter>. </para> <para> Le paramètre <parameter>backlog</parameter> définit la taille maximum de la queue de connexions en attente. <constant>SOMAXCONN</constant> peut être utilisée comme valeur pour le paramètre <parameter>backlog</parameter>. Reportez-vous à <function>socket_listen</function> pour plus de détails. </para> <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_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> <note> <para> Si vous voulez créer une socket qui n'écoute que certaines interfaces, vous devez utiliser <function>socket_create</function>, <function>socket_bind</function> et <function>socket_listen</function>. </para> </note> <para> Voir aussi <function>socket_create</function>, <function>socket_bind</function>, <function>socket_listen</function>, <function>socket_last_error</function> et <function>socket_strerror</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.3 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-create-listen"> + <refnamediv> + <refname>socket_create_listen</refname> + <refpurpose>Ouvre une socket sur un port pour accepter les connexions</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>resource</type><methodname>socket_create_listen</methodname> + <methodparam><type>int</type><parameter>port</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>backlog</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + <function>socket_create_listen</function> est destinée à simplifier + la création de nouvelles sockets destinées être mises en attente, et + accepter de nouvelles connexions. + </para> + <para> + <function>socket_create_listen</function> créée une nouvelle + ressource de socket, de type <constant>AF_INET</constant>, mise + en attente sur <emphasis>toutes</emphasis> les interfaces locales, + pour le port <parameter>port</parameter>. + </para> + <para> + Le paramètre <parameter>backlog</parameter> définit la taille + maximum de la queue de connexions en attente. + <constant>SOMAXCONN</constant> peut être utilisée comme + valeur pour le paramètre <parameter>backlog</parameter>. Reportez-vous + à <function>socket_listen</function> pour plus de détails. + </para> + <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_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> + <note> + <para> + Si vous voulez créer une socket qui n'écoute que certaines + interfaces, vous devez utiliser <function>socket_create</function>, + <function>socket_bind</function> et <function>socket_listen</function>. + </para> + </note> + <para> + Voir aussi + <function>socket_create</function>, + <function>socket_bind</function>, + <function>socket_listen</function>, + <function>socket_last_error</function> et + <function>socket_strerror</function>. + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-create-pair.xml diff -u phpdoc-fr/reference/sockets/functions/socket-create-pair.xml:1.2 phpdoc-fr/reference/sockets/functions/socket-create-pair.xml:1.3 --- phpdoc-fr/reference/sockets/functions/socket-create-pair.xml:1.2 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-create-pair.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,44 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-create-pair"> <refnamediv> <refname>socket_create_pair</refname> <refpurpose>Crée une paire de socket identiques et les stocke dans fds. </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_create_pair</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> <methodparam><type>array</type><parameter>&fd</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-create-pair"> + <refnamediv> + <refname>socket_create_pair</refname> + <refpurpose>Crée une paire de socket identiques et les stocke dans fds. </refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_create_pair</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> + <methodparam><type>array</type><parameter>&fd</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-create.xml diff -u phpdoc-fr/reference/sockets/functions/socket-create.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-create.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-create.xml:1.3 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/functions/socket-create.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,100 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.3 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.4 --> <refentry id="function.socket-create"> <refnamediv> <refname>socket_create</refname> <refpurpose>Crée une socket (point de communication)</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>resource</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. </para> <para> Le paramètre <parameter>domain</parameter> sélectionne le domaine (famille de protocole) à utiliser pour les communications. Actuellement, <constant>AF_INET</constant> et <constant>AF_UNIX</constant> sont les valeurs possibles de ce paramètre. <constant>AF_INET</constant> est typiquement utilisé pour les communications Internet. <constant>AF_UNIX</constant> utilise des chemins systèmes pour identifier les sockets, et par conséquent, peut être uniquement utilisé pour les communications locales (mais elles seront aussi plus rapides). </para> <para> Le paramètre <parameter>type</parameter> sélectionne le type de socket. Le type est représenté par les constantes suivantes : <constant>SOCK_STREAM</constant>, <constant>SOCK_DGRAM</constant>, <constant>SOCK_SEQPACKET</constant>, <constant>SOCK_RAW</constant>, <constant>SOCK_RDM</constant> ou <constant>SOCK_PACKET</constant>. Les deux types les plus courants sont <constant>SOCK_DGRAM</constant> pour le protocole <literal>UDP</literal> (connectionless) et <constant>SOCK_STREAM</constant> pour le protocole <literal>TCP</literal>. </para> <para> <parameter>protocol</parameter> sélectionne le protocole qui peut être soit <constant>SOL_UDP</constant>, soit <constant>SOL_TCP</constant>. </para> <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_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> <para> Pour plus d'informations sur l'utilisation de <function>socket_create</function>, et sur les significations des différents paramètres, reportez-vous au manuel Unix sur les sockets (2). </para> <note> <para> Si le paramètre <parameter>domain</parameter> ou <parameter>type</parameter> est donné, <function>socket_create</function> utilisera par défaut les valeurs <constant>AF_INET</constant> et <constant>SOCK_STREAM</constant>, respectivement. De plus, elle générera un message d'aleret (<constant>E_WARNING</constant>). </para> </note> <para> Voir aussi <function>socket_accept</function>, <function>socket_bind</function>, <function>socket_connect</function>, <function>socket_listen</function>, <function>socket_last_error</function>, et <function>socket_strerror</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.3 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.4 --> + <refentry id="function.socket-create"> + <refnamediv> + <refname>socket_create</refname> + <refpurpose>Crée une socket (point de communication)</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>resource</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. + </para> + <para> + Le paramètre <parameter>domain</parameter> sélectionne le domaine + (famille de protocole) à utiliser pour les communications. Actuellement, + <constant>AF_INET</constant> et <constant>AF_UNIX</constant> sont + les valeurs possibles de ce paramètre. <constant>AF_INET</constant> + est typiquement utilisé pour les communications Internet. + <constant>AF_UNIX</constant> utilise des chemins systèmes pour + identifier les sockets, et par conséquent, peut être uniquement utilisé + pour les communications locales (mais elles seront aussi plus rapides). + </para> + <para> + Le paramètre <parameter>type</parameter> sélectionne le + type de socket. Le type est représenté par les constantes suivantes : + <constant>SOCK_STREAM</constant>, + <constant>SOCK_DGRAM</constant>, + <constant>SOCK_SEQPACKET</constant>, + <constant>SOCK_RAW</constant>, <constant>SOCK_RDM</constant> ou + <constant>SOCK_PACKET</constant>. Les deux types les plus courants + sont <constant>SOCK_DGRAM</constant> pour le protocole <literal>UDP</literal> + (connectionless) et <constant>SOCK_STREAM</constant> pour le protocole + <literal>TCP</literal>. + </para> + <para> + <parameter>protocol</parameter> sélectionne le protocole qui peut être + soit <constant>SOL_UDP</constant>, soit <constant>SOL_TCP</constant>. + </para> + <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_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> + <para> + Pour plus d'informations sur l'utilisation de <function>socket_create</function>, + et sur les significations des différents paramètres, reportez-vous au + manuel Unix sur les sockets (2). + </para> + <note> + <para> + Si le paramètre <parameter>domain</parameter> ou <parameter>type</parameter> + est donné, <function>socket_create</function> utilisera par défaut + les valeurs <constant>AF_INET</constant> et + <constant>SOCK_STREAM</constant>, respectivement. De plus, elle + générera un message d'aleret (<constant>E_WARNING</constant>). + </para> + </note> + <para> + Voir aussi + <function>socket_accept</function>, + <function>socket_bind</function>, + <function>socket_connect</function>, + <function>socket_listen</function>, + <function>socket_last_error</function>, et + <function>socket_strerror</function>. + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-get-option.xml diff -u phpdoc-fr/reference/sockets/functions/socket-get-option.xml:1.2 phpdoc-fr/reference/sockets/functions/socket-get-option.xml:1.3 --- phpdoc-fr/reference/sockets/functions/socket-get-option.xml:1.2 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-get-option.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,49 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.3 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-get-option"> <refnamediv> <refname>socket_get_option</refname> <refpurpose>Lit les options de socket</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>mixed</type><methodname>socket_get_option</methodname> <methodparam><type>resource</type><parameter>socket</parameter></methodparam> <methodparam><type>int</type><parameter>level</parameter></methodparam> <methodparam><type>int</type><parameter>optname</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> <note> <para> Cette fonction était appelée <literal>socket_getopt()</literal> avant PHP 4.3.0. </para> </note> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.3 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-get-option"> + <refnamediv> + <refname>socket_get_option</refname> + <refpurpose>Lit les options de socket</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>mixed</type><methodname>socket_get_option</methodname> + <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>int</type><parameter>level</parameter></methodparam> + <methodparam><type>int</type><parameter>optname</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + <note> + <para> + Cette fonction était appelée <literal>socket_getopt()</literal> avant + PHP 4.3.0. + </para> + </note> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-getpeername.xml diff -u phpdoc-fr/reference/sockets/functions/socket-getpeername.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-getpeername.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-getpeername.xml:1.3 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/functions/socket-getpeername.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,68 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.5 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-getpeername"> <refnamediv> <refname>socket_getpeername</refname> <refpurpose> Interroge l'autre extrémité de la communication </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_getpeername</methodname> <methodparam><type>resource</type><parameter>socket</parameter></methodparam> <methodparam><type>string</type><parameter>&addr</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>&port</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> Si la socket <parameter>socket</parameter> est de type <constant>AF_INET</constant>, <function>socket_getpeername</function> retournera <emphasis>l'adresse IP</emphasis> de l'hôte, en notation numérique (e.g. <literal>127.0.0.1</literal>) dans le paramètre <parameter>address</parameter>, et si le paramètre optionnel <parameter>port</parameter> est présent, elle retournera aussi le port de la communication établie. </para> <para> Si la socket <parameter>socket</parameter> est de type <constant>AF_UNIX</constant>, <function>socket_getpeername</function> retournera le chemin sur le système de fichiers (e.g. <literal>/var/run/daemon.sock</literal>) dans le paramètre <parameter>address</parameter>. </para> <para> &return.success; <function>socket_getpeername</function> peut aussi retourner &false; si le type de la socket n'est ni <constant>AF_INET</constant> ni <constant>AF_UNIX</constant>, auquel cas le dernier code d'erreur socket n'est <emphasis>pas</emphasis> modifié. </para> <para> Voir aussi <function>socket_getsockname</function>, <function>socket_last_error</function> et <function>socket_strerror</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.5 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-getpeername"> + <refnamediv> + <refname>socket_getpeername</refname> + <refpurpose> + Interroge l'autre extrémité de la communication + </refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_getpeername</methodname> + <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>string</type><parameter>&addr</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>&port</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + Si la socket <parameter>socket</parameter> est de type <constant>AF_INET</constant>, + <function>socket_getpeername</function> retournera + <emphasis>l'adresse IP</emphasis> de l'hôte, en notation numérique (e.g. + <literal>127.0.0.1</literal>) dans le paramètre <parameter>address</parameter>, + et si le paramètre optionnel <parameter>port</parameter> est présent, elle + retournera aussi le port de la communication établie. + </para> + <para> + Si la socket <parameter>socket</parameter> est de type <constant>AF_UNIX</constant>, + <function>socket_getpeername</function> retournera le chemin sur le + système de fichiers (e.g. <literal>/var/run/daemon.sock</literal>) dans le + paramètre <parameter>address</parameter>. + </para> + <para> + &return.success; <function>socket_getpeername</function> peut aussi + retourner &false; si le type de la socket n'est ni <constant>AF_INET</constant> + ni <constant>AF_UNIX</constant>, auquel cas le dernier code d'erreur socket + n'est <emphasis>pas</emphasis> modifié. + </para> + <para> + Voir aussi + <function>socket_getsockname</function>, + <function>socket_last_error</function> et + <function>socket_strerror</function>. + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-getsockname.xml diff -u phpdoc-fr/reference/sockets/functions/socket-getsockname.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-getsockname.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-getsockname.xml:1.3 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-getsockname.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,68 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.3 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-getsockname"> <refnamediv> <refname>socket_getsockname</refname> <refpurpose> Interroge la socket locale </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_getsockname</methodname> <methodparam><type>resource</type><parameter>socket</parameter></methodparam> <methodparam><type>string</type><parameter>&addr</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>&port</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> Si la socket <parameter>socket</parameter> est de type <constant>AF_INET</constant>, <function>socket_getsockname</function> retournera <emphasis>l'adresse IP</emphasis> locale, en notation numérique (e.g. <literal>127.0.0.1</literal>) dans le paramètre <parameter>address</parameter>, et si le paramètre optionnel <parameter>port</parameter> est présent, elle retournera aussi le port de la communication établie. </para> <para> Si la socket <parameter>socket</parameter> est de type <constant>AF_UNIX</constant>, <function>socket_getsockname</function> retournera le chemin sur le système de fichiers (e.g. <literal>/var/run/daemon.sock</literal>) dans le paramètre <parameter>address</parameter>. </para> <para> &return.success; <function>socket_getsockname</function> peut aussi retourner &false; si le type de la socket n'est ni <constant>AF_INET</constant> ni <constant>AF_UNIX</constant>, auquel cas le dernier code d'erreur socket n'est <emphasis>pas</emphasis> modifié. </para> <para> Voir aussi <function>socket_getpeername</function>, <function>socket_last_error</function> et <function>socket_strerror</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.3 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-getsockname"> + <refnamediv> + <refname>socket_getsockname</refname> + <refpurpose> + Interroge la socket locale + </refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_getsockname</methodname> + <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>string</type><parameter>&addr</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>&port</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + Si la socket <parameter>socket</parameter> est de type <constant>AF_INET</constant>, + <function>socket_getsockname</function> retournera + <emphasis>l'adresse IP</emphasis> locale, en notation numérique (e.g. + <literal>127.0.0.1</literal>) dans le paramètre <parameter>address</parameter>, + et si le paramètre optionnel <parameter>port</parameter> est présent, elle + retournera aussi le port de la communication établie. + </para> + <para> + Si la socket <parameter>socket</parameter> est de type <constant>AF_UNIX</constant>, + <function>socket_getsockname</function> retournera le chemin sur le + système de fichiers (e.g. <literal>/var/run/daemon.sock</literal>) dans le + paramètre <parameter>address</parameter>. + </para> + <para> + &return.success; <function>socket_getsockname</function> peut aussi + retourner &false; si le type de la socket n'est ni <constant>AF_INET</constant> + ni <constant>AF_UNIX</constant>, auquel cas le dernier code d'erreur socket + n'est <emphasis>pas</emphasis> modifié. + </para> + <para> + Voir aussi + <function>socket_getpeername</function>, + <function>socket_last_error</function> et + <function>socket_strerror</function>. + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-iovec-add.xml diff -u phpdoc-fr/reference/sockets/functions/socket-iovec-add.xml:1.1 phpdoc-fr/reference/sockets/functions/socket-iovec-add.xml:1.2 --- phpdoc-fr/reference/sockets/functions/socket-iovec-add.xml:1.1 Wed Jul 24 23:40:32 2002 +++ phpdoc-fr/reference/sockets/functions/socket-iovec-add.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,42 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-iovec-add"> <refnamediv> <refname>socket_iovec_add</refname> <refpurpose>Ajoute un nouveau vecteur dans le tableau</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_iovec_add</methodname> <methodparam><type>resource</type><parameter>iovec</parameter></methodparam> <methodparam><type>int</type><parameter>iov_len</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-iovec-add"> + <refnamediv> + <refname>socket_iovec_add</refname> + <refpurpose>Ajoute un nouveau vecteur dans le tableau</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_iovec_add</methodname> + <methodparam><type>resource</type><parameter>iovec</parameter></methodparam> + <methodparam><type>int</type><parameter>iov_len</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-iovec-alloc.xml diff -u phpdoc-fr/reference/sockets/functions/socket-iovec-alloc.xml:1.1 phpdoc-fr/reference/sockets/functions/socket-iovec-alloc.xml:1.2 --- phpdoc-fr/reference/sockets/functions/socket-iovec-alloc.xml:1.1 Wed Jul 24 23:40:32 2002 +++ phpdoc-fr/reference/sockets/functions/socket-iovec-alloc.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,42 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-iovec-alloc"> <refnamediv> <refname>socket_iovec_alloc</refname> <refpurpose>Construit un 'struct iovec'</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>resource</type><methodname>socket_iovec_alloc</methodname> <methodparam><type>int</type><parameter>num_vectors</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter/></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-iovec-alloc"> + <refnamediv> + <refname>socket_iovec_alloc</refname> + <refpurpose>Construit un 'struct iovec'</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>resource</type><methodname>socket_iovec_alloc</methodname> + <methodparam><type>int</type><parameter>num_vectors</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter/></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-iovec-delete.xml diff -u phpdoc-fr/reference/sockets/functions/socket-iovec-delete.xml:1.1 phpdoc-fr/reference/sockets/functions/socket-iovec-delete.xml:1.2 --- phpdoc-fr/reference/sockets/functions/socket-iovec-delete.xml:1.1 Wed Jul 24 23:40:32 2002 +++ phpdoc-fr/reference/sockets/functions/socket-iovec-delete.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,42 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-iovec-delete"> <refnamediv> <refname>socket_iovec_delete</refname> <refpurpose>Efface un vecteur</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_iovec_delete</methodname> <methodparam><type>resource</type><parameter>iovec</parameter></methodparam> <methodparam><type>int</type><parameter>iov_pos</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-iovec-delete"> + <refnamediv> + <refname>socket_iovec_delete</refname> + <refpurpose>Efface un vecteur</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_iovec_delete</methodname> + <methodparam><type>resource</type><parameter>iovec</parameter></methodparam> + <methodparam><type>int</type><parameter>iov_pos</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-iovec-fetch.xml diff -u phpdoc-fr/reference/sockets/functions/socket-iovec-fetch.xml:1.2 phpdoc-fr/reference/sockets/functions/socket-iovec-fetch.xml:1.3 --- phpdoc-fr/reference/sockets/functions/socket-iovec-fetch.xml:1.2 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-iovec-fetch.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,42 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-iovec-fetch"> <refnamediv> <refname>socket_iovec_fetch</refname> <refpurpose>Lit les données du vecteur specifié par iovec_id[iovec_position] </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>string</type><methodname>socket_iovec_fetch</methodname> <methodparam><type>resource</type><parameter>iovec</parameter></methodparam> <methodparam><type>int</type><parameter>iovec_position</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-iovec-fetch"> + <refnamediv> + <refname>socket_iovec_fetch</refname> + <refpurpose>Lit les données du vecteur specifié par iovec_id[iovec_position] </refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>string</type><methodname>socket_iovec_fetch</methodname> + <methodparam><type>resource</type><parameter>iovec</parameter></methodparam> + <methodparam><type>int</type><parameter>iovec_position</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-iovec-free.xml diff -u phpdoc-fr/reference/sockets/functions/socket-iovec-free.xml:1.2 phpdoc-fr/reference/sockets/functions/socket-iovec-free.xml:1.3 --- phpdoc-fr/reference/sockets/functions/socket-iovec-free.xml:1.2 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-iovec-free.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,41 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-iovec-free"> <refnamediv> <refname>socket_iovec_free</refname> <refpurpose>Détruit le vecteur iovec specifié par iovec_id </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_iovec_free</methodname> <methodparam><type>resource</type><parameter>iovec</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-iovec-free"> + <refnamediv> + <refname>socket_iovec_free</refname> + <refpurpose>Détruit le vecteur iovec specifié par iovec_id </refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_iovec_free</methodname> + <methodparam><type>resource</type><parameter>iovec</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-iovec-set.xml diff -u phpdoc-fr/reference/sockets/functions/socket-iovec-set.xml:1.2 phpdoc-fr/reference/sockets/functions/socket-iovec-set.xml:1.3 --- phpdoc-fr/reference/sockets/functions/socket-iovec-set.xml:1.2 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-iovec-set.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,43 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-iovec-set"> <refnamediv> <refname>socket_iovec_set</refname> <refpurpose>Modifie les données du vecteur iovec_id[iovec_position]</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_iovec_set</methodname> <methodparam><type>resource</type><parameter>iovec</parameter></methodparam> <methodparam><type>int</type><parameter>iovec_position</parameter></methodparam> <methodparam><type>string</type><parameter>new_val</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-iovec-set"> + <refnamediv> + <refname>socket_iovec_set</refname> + <refpurpose>Modifie les données du vecteur iovec_id[iovec_position]</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_iovec_set</methodname> + <methodparam><type>resource</type><parameter>iovec</parameter></methodparam> + <methodparam><type>int</type><parameter>iovec_position</parameter></methodparam> + <methodparam><type>string</type><parameter>new_val</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-last-error.xml diff -u phpdoc-fr/reference/sockets/functions/socket-last-error.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-last-error.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-last-error.xml:1.3 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/functions/socket-last-error.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,68 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.4 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.1 --> <refentry id="function.socket-last-error"> <refnamediv> <refname>socket_last_error</refname> <refpurpose>Lit la dernière erreur générée par une socket</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>socket_last_error</methodname> <methodparam choice="opt"><type>resource</type><parameter>socket</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> <function>socket_last_error</function> retourne un code d'erreur socket. </para> <para> Si un paramètre est passé à cette fonction, la dernière erreur qui aura été générée par cette socket sera retournée. Si la ressource de socket est omise, 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 retourne pas de socket en cas d'echec, et <function>socket_select</function> qui peut échouer sans raison directement liée à la socket. Le code d'erreur peut être transmis à <function>socket_strerror</function> qui retourne un message d'erreur lisible. <programlisting role="php"><![CDATA[<?php if (false == ($socket = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP))) { die("Impossible de créer la socket, le code d'erreur est : " . socket_last_error() . ", le message d'erreur est : " . socket_strerror(socket_last_error())); }?>]]> </programlisting> </para> <note> <para> <function>socket_last_error</function> n'efface pas le code d'erreur. Utilisez plutôt la fonction <function>socket_clear_error</function> pour cela. </para> </note> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.4 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.1 --> + <refentry id="function.socket-last-error"> + <refnamediv> + <refname>socket_last_error</refname> + <refpurpose>Lit la dernière erreur générée par une socket</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>int</type><methodname>socket_last_error</methodname> + <methodparam choice="opt"><type>resource</type><parameter>socket</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + <function>socket_last_error</function> retourne un code d'erreur socket. + </para> + <para> + Si un paramètre est passé à cette fonction, la dernière erreur + qui aura été générée par cette socket sera retournée. Si la ressource + de socket est omise, 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 retourne pas de socket + en cas d'echec, et <function>socket_select</function> qui peut + échouer sans raison directement liée à la socket. Le code d'erreur + peut être transmis à <function>socket_strerror</function> qui retourne + un message d'erreur lisible. + <programlisting role="php"> +<![CDATA[ +<?php + if (false == ($socket = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP))) { + die("Impossible de créer la socket, le code d'erreur est : " . socket_last_error() . + ", le message d'erreur est : " . socket_strerror(socket_last_error())); + } +?> +]]> + </programlisting> + </para> + <note> + <para> + <function>socket_last_error</function> n'efface pas le code d'erreur. Utilisez + plutôt la fonction <function>socket_clear_error</function> pour cela. + </para> + </note> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-listen.xml diff -u phpdoc-fr/reference/sockets/functions/socket-listen.xml:1.2 phpdoc-fr/reference/sockets/functions/socket-listen.xml:1.3 --- phpdoc-fr/reference/sockets/functions/socket-listen.xml:1.2 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-listen.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,82 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.3 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.1 --> <refentry id="function.socket-listen"> <refnamediv> <refname>socket_listen</refname> <refpurpose>Attend une connexion (listen) sur une socket</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_listen</methodname> <methodparam><type>resource</type><parameter>socket</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>backlog</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> Une fois que la socket <parameter>socket</parameter> a été créée avec la focntion <function>socket_create</function> et liée à un nom avec la fonction <function>socket_bind</function>, elle peut être mise en attente de connexion entrantes. </para> <para> Un nombre maximum de <parameter>backlog</parameter> connexions seront mises en attente de traitement. Si une demande de connexion arrive et que la queue est pleine, le client recevra une erreur indiquant <literal>ECONNREFUSED</literal>, ou, si le protocole de support accepte les retransmissions, la requête sera ignorée pour que les tentatives ultérieures finissent par réussir. </para> <note> <para> Le nombre maximum passé dans le paramètre <parameter>backlog</parameter> dépend essentiellement de la plate forme de support. Sur Linux, c'est tronqué automatiquement à <constant>SOMAXCONN</constant>. Sous Windows32, si la constante <constant>SOMAXCONN</constant> est passée, le service responsable des sockets choisira une valeur maximum <emphasis>raisonnable</emphasis>. Il n'y a pas de méthode pour deviner la valeur réellement choisie. </para> </note> <para> <function>socket_listen</function> ne fonctionne qu'avec des sockets de type <constant>SOCK_STREAM</constant> et <constant>SOCK_SEQPACKET</constant>. </para> <para> &return.success; 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> <para> Voir aussi <function>socket_accept</function>, <function>socket_bind</function>, <function>socket_connect</function>, <function>socket_create</function> et <function>socket_strerror</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.3 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.1 --> + <refentry id="function.socket-listen"> + <refnamediv> + <refname>socket_listen</refname> + <refpurpose>Attend une connexion (listen) sur une socket</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_listen</methodname> + <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>backlog</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + Une fois que la socket <parameter>socket</parameter> a été créée avec la focntion + <function>socket_create</function> et liée à un nom avec la fonction + <function>socket_bind</function>, elle peut être mise en attente de connexion + entrantes. + </para> + <para> + Un nombre maximum de <parameter>backlog</parameter> connexions seront mises + en attente de traitement. Si une demande de connexion arrive et que la + queue est pleine, le client recevra une erreur indiquant + <literal>ECONNREFUSED</literal>, ou, si le protocole de support accepte + les retransmissions, la requête sera ignorée pour que les tentatives + ultérieures finissent par réussir. + </para> + <note> + <para> + Le nombre maximum passé dans le paramètre <parameter>backlog</parameter> + dépend essentiellement de la plate forme de support. Sur Linux, c'est + tronqué automatiquement à <constant>SOMAXCONN</constant>. Sous Windows32, + si la constante <constant>SOMAXCONN</constant> est passée, le service + responsable des sockets choisira une valeur maximum <emphasis>raisonnable</emphasis>. + Il n'y a pas de méthode pour deviner la valeur réellement choisie. + </para> + </note> + <para> + <function>socket_listen</function> ne fonctionne qu'avec des sockets de + type <constant>SOCK_STREAM</constant> et <constant>SOCK_SEQPACKET</constant>. + </para> + <para> + &return.success; 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> + <para> + Voir aussi + <function>socket_accept</function>, + <function>socket_bind</function>, + <function>socket_connect</function>, + <function>socket_create</function> et + <function>socket_strerror</function>. + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-read.xml diff -u phpdoc-fr/reference/sockets/functions/socket-read.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-read.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-read.xml:1.3 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/functions/socket-read.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,92 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.3 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.8 --> <refentry id="function.socket-read"> <refnamediv> <refname>socket_read</refname> <refpurpose>Lit des données d'une socket</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>string</type><methodname>socket_read</methodname> <methodparam><type>resource</type><parameter>socket</parameter></methodparam> <methodparam><type>int</type><parameter>length</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>type</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> <function>socket_read</function> lit des données dans la socket <parameter>socket</parameter>, qui doit être une ressource créée par <function>socket_accept</function>. Elle lit un maximum de <parameter>length</parameter> octets. Sinon, vous pouvez utiliser <constant>\r</constant>, <constant>\n</constant> or <constant>\0</constant> pour terminer la lecture (suivant la valeur choisie pour <parameter>type</parameter>, voir ci-dessous). </para> <para> <function>socket_read</function> retourne les données sous forme de chaine 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> <note> <para> <function>socket_read</function> peut retourner une chaîne de longueur zéro, qui indique la fin de la communication (l'autre socket a fermé la communication). </para> </note> <para> Le paramètre optinnel <parameter>type</parameter> peut prendre l'une des valeurs constantes suivantes : <itemizedlist> <listitem> <simpara> PHP_BINARY_READ - utilise la fonction système <literal>read()</literal>. Capable de lire les données binaires. (valeur par défaut en PHP >= 4.1.0) </simpara> </listitem> <listitem> <simpara> PHP_NORMAL_READ - la lecture s'arrête aux \n et \r. (valeur par défaut en PHP <= 4.0.6) </simpara> </listitem> </itemizedlist> </para> <para> Voir aussi <function>socket_accept</function>, <function>socket_bind</function>, <function>socket_connect</function>, <function>socket_listen</function>, <function>socket_last_error</function>, <function>socket_strerror</function> et <function>socket_write</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.3 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.8 --> + <refentry id="function.socket-read"> + <refnamediv> + <refname>socket_read</refname> + <refpurpose>Lit des données d'une socket</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>string</type><methodname>socket_read</methodname> + <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>int</type><parameter>length</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>type</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + <function>socket_read</function> lit des données dans la socket + <parameter>socket</parameter>, qui doit être une ressource créée par + <function>socket_accept</function>. Elle lit un maximum de + <parameter>length</parameter> octets. Sinon, vous pouvez utiliser + <constant>\r</constant>, <constant>\n</constant> or <constant>\0</constant> + pour terminer la lecture (suivant la valeur choisie pour <parameter>type</parameter>, + voir ci-dessous). + </para> + <para> + <function>socket_read</function> retourne les données sous forme de + chaine 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> + <note> + <para> + <function>socket_read</function> peut retourner une chaîne de longueur + zéro, qui indique la fin de la communication (l'autre socket a fermé + la communication). + </para> + </note> + <para> + Le paramètre optinnel <parameter>type</parameter> peut prendre l'une des valeurs + constantes suivantes : + <itemizedlist> + <listitem> + <simpara> + PHP_BINARY_READ - utilise la fonction système <literal>read()</literal>. + Capable de lire les données binaires. (valeur par défaut en PHP >= 4.1.0) + </simpara> + </listitem> + <listitem> + <simpara> + PHP_NORMAL_READ - la lecture s'arrête aux \n et \r. + (valeur par défaut en PHP <= 4.0.6) + </simpara> + </listitem> + </itemizedlist> + </para> + <para> + Voir aussi + <function>socket_accept</function>, + <function>socket_bind</function>, + <function>socket_connect</function>, + <function>socket_listen</function>, + <function>socket_last_error</function>, + <function>socket_strerror</function> et + <function>socket_write</function>. + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-readv.xml diff -u phpdoc-fr/reference/sockets/functions/socket-readv.xml:1.2 phpdoc-fr/reference/sockets/functions/socket-readv.xml:1.3 --- phpdoc-fr/reference/sockets/functions/socket-readv.xml:1.2 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-readv.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,42 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-readv"> <refnamediv> <refname>socket_readv</refname> <refpurpose>Lit des données dans un fd, en utilisant le tableau scatter-gather définit par iovec_id </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_readv</methodname> <methodparam><type>resource</type><parameter>socket</parameter></methodparam> <methodparam><type>resource</type><parameter>iovec_id</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-readv"> + <refnamediv> + <refname>socket_readv</refname> + <refpurpose>Lit des données dans un fd, en utilisant le tableau scatter-gather définit par iovec_id </refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_readv</methodname> + <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>resource</type><parameter>iovec_id</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-recv.xml diff -u phpdoc-fr/reference/sockets/functions/socket-recv.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-recv.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-recv.xml:1.3 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/functions/socket-recv.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,44 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-recv"> <refnamediv> <refname>socket_recv</refname> <refpurpose>Reçoit des données d'une socket connectée</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>socket_recv</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> <methodparam><type>int</type><parameter>flags</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-recv"> + <refnamediv> + <refname>socket_recv</refname> + <refpurpose>Reçoit des données d'une socket connectée</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>int</type><methodname>socket_recv</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> + <methodparam><type>int</type><parameter>flags</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-recvfrom.xml diff -u phpdoc-fr/reference/sockets/functions/socket-recvfrom.xml:1.2 phpdoc-fr/reference/sockets/functions/socket-recvfrom.xml:1.3 --- phpdoc-fr/reference/sockets/functions/socket-recvfrom.xml:1.2 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-recvfrom.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,46 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-recvfrom"> <refnamediv> <refname>socket_recvfrom</refname> <refpurpose>Reçoit des données d'une socket, connectée ou pas </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>socket_recvfrom</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> <methodparam><type>int</type><parameter>flags</parameter></methodparam> <methodparam><type>string</type><parameter>&name</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>&port</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-recvfrom"> + <refnamediv> + <refname>socket_recvfrom</refname> + <refpurpose>Reçoit des données d'une socket, connectée ou pas </refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>int</type><methodname>socket_recvfrom</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> + <methodparam><type>int</type><parameter>flags</parameter></methodparam> + <methodparam><type>string</type><parameter>&name</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>&port</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-recvmsg.xml diff -u phpdoc-fr/reference/sockets/functions/socket-recvmsg.xml:1.2 phpdoc-fr/reference/sockets/functions/socket-recvmsg.xml:1.3 --- phpdoc-fr/reference/sockets/functions/socket-recvmsg.xml:1.2 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-recvmsg.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,47 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-recvmsg"> <refnamediv> <refname>socket_recvmsg</refname> <refpurpose>Reçoit des messages sur uen socket, qu'elle soit orientée connexion ou pas</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_recvmsg</methodname> <methodparam><type>resource</type><parameter>socket</parameter></methodparam> <methodparam><type>resource</type><parameter>iovec</parameter></methodparam> <methodparam><type>array</type><parameter>&control</parameter></methodparam> <methodparam><type>int</type><parameter>&controllen</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></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-recvmsg"> + <refnamediv> + <refname>socket_recvmsg</refname> + <refpurpose>Reçoit des messages sur uen socket, qu'elle soit orientée connexion ou pas</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_recvmsg</methodname> + <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>resource</type><parameter>iovec</parameter></methodparam> + <methodparam><type>array</type><parameter>&control</parameter></methodparam> + <methodparam><type>int</type><parameter>&controllen</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></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-select.xml diff -u phpdoc-fr/reference/sockets/functions/socket-select.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-select.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-select.xml:1.3 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/functions/socket-select.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,194 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.7 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-select"> <refnamediv> <refname>socket_select</refname> <refpurpose>Exécute l'appel système select() un tableau de socket avec une durée d'expiration</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>socket_select</methodname> <methodparam><type>resource</type><parameter>&read</parameter></methodparam> <methodparam><type>resource</type><parameter>&write</parameter></methodparam> <methodparam><type>resource</type><parameter>&except</parameter></methodparam> <methodparam><type>int</type><parameter>tv_sec</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>tv_usec</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <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 reconnaitront dans ces tableaux de sockets les sets de file descriptor. Trois tableaux indépendants de ressources de sockets sont surveillés. </para> <para> Les sockets listées dans le paramètre <parameter>read</parameter> seront surveillées en lecture : pour savoir quand elles sont disponibles en lecture (plus précisément, si une lecture ne va pas bloquer, en particulier, une ressource de socket a déjà atteint une fin de fichier, auquel cas <function>socket_read</function> retournera une chaîne de taille zéro). </para> <para> Les sockets listées dans <parameter>write</parameter> seront surveillées en écriture : pour voir si une écriture ne va pas bloquer. </para> <para> Les sockets listées dans <parameter>except</parameter> seront surveillées pour leurs exceptions. </para> <warning> <para> En sortie de fonction, les tableaux sont modifiées pour indiquer quelles sockets ont changés d'états. </para> </warning> <para> Vous n'avez pas besoin de passer tous les tableaux à <function>socket_select</function>. Vous pouvez les omettre, ou utiliser un tableau vide, ou encore &null; à la place. N'oubliez pas que ces tableaux sont passés par <emphasis>référence</emphasis> et seront modifiés par <function>socket_select</function>. </para> <para> Exemple: <programlisting role="php"><![CDATA[<?php /* Prépare le tableau read (socket surveillées en lecture) */ $read = array($socket1, $socket2); if (false === ($num_changed_sockets = socket_select($read, $write = NULL, $except = NULL, 0))) { /* Gestion des erreurs */ else if ($num_changed_sockets > 0) { /* Au moins une des sockets a été modifié */ }?>]]> </programlisting> </para> <note> <para> A cause d'une limitation du Zend Engine actuel, il n'est pas possible de passer une constante comme &null; directement comme paramètre à cette focntion, qui attend une valeur par référence. A la place, utiliser un tableau temporaireou une expression dont le membre de gauche est une variable temporaire : <programlisting role="php"><![CDATA[<?php socket_select($r, $w, $e = NULL, 0);?>]]> </programlisting> </para> </note> <para> Les paramètres <parameter>tv_sec</parameter> and <parameter>tv_usec</parameter> ensemble forment le paramètre <emphasis>timeout</emphasis> (durée de vie). Le <emphasis>timeout</emphasis> 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 <function>socket_select</function> retournera immédiatement. C'est très pratique opur faire du polling (sondage). Si <parameter>tv_sec</parameter> est &null; (pas de timeout), <function>socket_select</function> peut se bloquer indéfiniment. </para> <para> En cas de succès, <function>socket_select</function> retourne le nombre de sockets contenus dans les tableaux modifiées. Ce nombre peut être zéro si la durée maximale d'attente a été atteinte. En cas d'erreur, &false; est retourné. 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> <note> <para> Assurez vous bien d'utiliser l'opérateur <literal>===</literal> lorsque vous vérifiez les erreurs. Etant donnée que <function>socket_select</function> peut retourner 0, la comparaison avec &false via <literal>==</literal> donnerait &true; : <programlisting role="php"><![CDATA[<?php if (false === socket_select($r, $w, $e = NULL, 0)) { echo "socket_select() a échoué. Raison : " . socket_strerror(socket_last_error()) . "\n"; }?>]]> </programlisting> </para> </note> <note> <para> Méfiez vous des implémentations de sockets, qui doivent être manipulées avec délicatesse. Quelques règles de base : <itemizedlist> <listitem> <simpara> Vous devez toujours essayer d'utiliser <function>socket_select</function> sans timeout. Votre programme ne devrait avoir rien à faire si il n'y a pas de données disponibles. Le code qui dépends d'un timeout est généralement peut portable, et difficile à déboguer. </simpara> </listitem> <listitem> <simpara> Une socket ne doit pas être ajoutée à l'un des tableaux en paramètre, si vous ne souhaitez pas vérifier le résultat après l'appel à <function>socket_select</function>. Après le retour de <function>socket_select</function>, toutes les sockets dans tous les tableaux doivent être vérifiées. Toute socket qui est disponible en écriture ou en lecture doit être utilisée pour écrire ou lire. </simpara> </listitem> <listitem> <simpara> Si vous écrivez ou lisez avec une socket retournée dans un tableau, soyez conscient qu'elles ne pourront pas écrire ou lire toutes les données que vous demandez. Soyez prêts à ne pouvoir lire qu'un seul octet. </simpara> </listitem> <listitem> <simpara> Il est commun à la plupart des implémentations de socket que la seule exception interceptée par les sockets dans le tableau <parameter>except</parameter> est le cas des données hors limites, reçues par une socket. </simpara> </listitem> </itemizedlist> </para> </note> <para> Voir aussi <function>socket_read</function>, <function>socket_write</function>, <function>socket_last_error</function> et <function>socket_strerror</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.7 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-select"> + <refnamediv> + <refname>socket_select</refname> + <refpurpose>Exécute l'appel système select() un tableau de socket avec une durée d'expiration</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>int</type><methodname>socket_select</methodname> + <methodparam><type>resource</type><parameter>&read</parameter></methodparam> + <methodparam><type>resource</type><parameter>&write</parameter></methodparam> + <methodparam><type>resource</type><parameter>&except</parameter></methodparam> + <methodparam><type>int</type><parameter>tv_sec</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>tv_usec</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <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 reconnaitront dans ces tableaux de sockets les + sets de file descriptor. Trois tableaux indépendants de ressources + de sockets sont surveillés. + </para> + <para> + Les sockets listées dans le paramètre <parameter>read</parameter> seront surveillées + en lecture : pour savoir quand elles sont disponibles en lecture (plus + précisément, si une lecture ne va pas bloquer, en particulier, une ressource + de socket a déjà atteint une fin de fichier, auquel cas + <function>socket_read</function> retournera une chaîne de taille zéro). + </para> + <para> + Les sockets listées dans <parameter>write</parameter> seront surveillées + en écriture : pour voir si une écriture ne va pas bloquer. + </para> + <para> + Les sockets listées dans <parameter>except</parameter> seront surveillées pour + leurs exceptions. + </para> + <warning> + <para> + En sortie de fonction, les tableaux sont modifiées pour indiquer + quelles sockets ont changés d'états. + </para> + </warning> + <para> + Vous n'avez pas besoin de passer tous les tableaux à + <function>socket_select</function>. Vous pouvez les omettre, ou + utiliser un tableau vide, ou encore &null; à la place. N'oubliez pas + que ces tableaux sont passés par <emphasis>référence</emphasis> et + seront modifiés par <function>socket_select</function>. + </para> + <para> + Exemple: + <programlisting role="php"> +<![CDATA[ +<?php + /* Prépare le tableau read (socket surveillées en lecture) */ + $read = array($socket1, $socket2); + + if (false === ($num_changed_sockets = socket_select($read, $write = NULL, $except = NULL, 0))) { + /* Gestion des erreurs */ + else if ($num_changed_sockets > 0) { + /* Au moins une des sockets a été modifié */ + } +?> +]]> + </programlisting> + </para> + <note> + <para> + A cause d'une limitation du Zend Engine actuel, il n'est pas possible + de passer une constante comme &null; directement comme paramètre à cette + focntion, qui attend une valeur par référence. A la place, utiliser + un tableau temporaireou une expression dont le membre de gauche + est une variable temporaire : + <programlisting role="php"> +<![CDATA[ +<?php + socket_select($r, $w, $e = NULL, 0); +?> +]]> + </programlisting> + </para> + </note> + <para> + Les paramètres <parameter>tv_sec</parameter> and <parameter>tv_usec</parameter> + ensemble forment le paramètre <emphasis>timeout</emphasis> (durée de vie). + Le <emphasis>timeout</emphasis> 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 + <function>socket_select</function> retournera immédiatement. C'est très + pratique opur faire du polling (sondage). Si <parameter>tv_sec</parameter> est &null; + (pas de timeout), <function>socket_select</function> peut se bloquer indéfiniment. + </para> + <para> + En cas de succès, <function>socket_select</function> retourne le nombre de + sockets contenus dans les tableaux modifiées. Ce nombre peut être zéro si + la durée maximale d'attente a été atteinte. En cas d'erreur, &false; + est retourné. 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> + <note> + <para> + Assurez vous bien d'utiliser l'opérateur <literal>===</literal> + lorsque vous vérifiez les erreurs. Etant donnée que + <function>socket_select</function> peut retourner 0, la comparaison + avec &false via <literal>==</literal> donnerait &true; : + <programlisting role="php"> +<![CDATA[ +<?php + if (false === socket_select($r, $w, $e = NULL, 0)) { + echo "socket_select() a échoué. Raison : " . socket_strerror(socket_last_error()) . "\n"; + } +?> +]]> + </programlisting> + </para> + </note> + <note> + <para> + Méfiez vous des implémentations de sockets, qui doivent être manipulées avec + délicatesse. Quelques règles de base : + <itemizedlist> + <listitem> + <simpara> + Vous devez toujours essayer d'utiliser <function>socket_select</function> + sans timeout. Votre programme ne devrait avoir rien à faire si + il n'y a pas de données disponibles. Le code qui dépends d'un + timeout est généralement peut portable, et difficile à déboguer. + </simpara> + </listitem> + <listitem> + <simpara> + Une socket ne doit pas être ajoutée à l'un des tableaux en paramètre, + si vous ne souhaitez pas vérifier le résultat après l'appel à + <function>socket_select</function>. Après le retour de + <function>socket_select</function>, toutes les sockets dans tous les + tableaux doivent être vérifiées. Toute socket qui est disponible en + écriture ou en lecture doit être utilisée pour écrire ou lire. + </simpara> + </listitem> + <listitem> + <simpara> + Si vous écrivez ou lisez avec une socket retournée dans un tableau, + soyez conscient qu'elles ne pourront pas écrire ou lire toutes les données + que vous demandez. Soyez prêts à ne pouvoir lire qu'un seul octet. + </simpara> + </listitem> + <listitem> + <simpara> + Il est commun à la plupart des implémentations de socket que la seule + exception interceptée par les sockets dans le tableau + <parameter>except</parameter> est le cas des données hors limites, + reçues par une socket. + </simpara> + </listitem> + </itemizedlist> + </para> + </note> + <para> + Voir aussi + <function>socket_read</function>, + <function>socket_write</function>, + <function>socket_last_error</function> et + <function>socket_strerror</function>. + </para> + </refsect1> + </refentry> +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-send.xml diff -u phpdoc-fr/reference/sockets/functions/socket-send.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-send.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-send.xml:1.3 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/functions/socket-send.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,92 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-send"> <refnamediv> <refname>socket_send</refname> <refpurpose>Envoie des données à une socket connectée</refpurpose> </refnamediv> <refsect1> <title>Description</title> <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> <methodparam><type>int</type><parameter>flags</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> La fonction <function>socket_send</function> envoie <parameter>len</parameter> octets à la socket <parameter>socket</parameter> depuis le buffer <parameter>buf</parameter>. </para> <para> Le paramètre <parameter>flags</parameter> peut être la combinaison des valeurs suivantes : <table> <title>Valeurs possibles pour <parameter>flags</parameter></title> <tgroup cols="2"> <tbody> <row> <entry><literal>0x1</literal></entry> <entry> Traite les données OOB (out-of-band). </entry> </row> <row> <entry><literal>0x2</literal></entry> <entry> Traite le message entrant (peek). </entry> </row> <row> <entry><literal>0x4</literal></entry> <entry> Ignore le routage, utilise une interface directe. </entry> </row> <row> <entry><literal>0x8</literal></entry> <entry> Les données complètent l'enregistrement. </entry> </row> <row> <entry><literal>0x100</literal></entry> <entry> Les données complètent la transaction. </entry> </row> </tbody> </tgroup> </table> </para> <para> Voir aussi <function>socket_sendmsg</function> et <function>socket_sendto</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-send"> + <refnamediv> + <refname>socket_send</refname> + <refpurpose>Envoie des données à une socket connectée</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <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> + <methodparam><type>int</type><parameter>flags</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + La fonction <function>socket_send</function> envoie + <parameter>len</parameter> octets à la socket + <parameter>socket</parameter> depuis le buffer <parameter>buf</parameter>. + </para> + <para> + Le paramètre <parameter>flags</parameter> peut être la combinaison + des valeurs suivantes : + <table> + <title>Valeurs possibles pour <parameter>flags</parameter></title> + <tgroup cols="2"> + <tbody> + <row> + <entry><literal>0x1</literal></entry> + <entry> + Traite les données OOB (out-of-band). + </entry> + </row> + <row> + <entry><literal>0x2</literal></entry> + <entry> + Traite le message entrant (peek). + </entry> + </row> + <row> + <entry><literal>0x4</literal></entry> + <entry> + Ignore le routage, utilise une interface directe. + </entry> + </row> + <row> + <entry><literal>0x8</literal></entry> + <entry> + Les données complètent l'enregistrement. + </entry> + </row> + <row> + <entry><literal>0x100</literal></entry> + <entry> + Les données complètent la transaction. + </entry> + </row> + </tbody> + </tgroup> + </table> + </para> + <para> + Voir aussi + <function>socket_sendmsg</function> et + <function>socket_sendto</function>. + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-sendmsg.xml diff -u phpdoc-fr/reference/sockets/functions/socket-sendmsg.xml:1.2 phpdoc-fr/reference/sockets/functions/socket-sendmsg.xml:1.3 --- phpdoc-fr/reference/sockets/functions/socket-sendmsg.xml:1.2 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-sendmsg.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,45 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-sendmsg"> <refnamediv> <refname>socket_sendmsg</refname> <refpurpose>Envoie un message à une socket, qu'elle soit orientée connexion ou pas </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_sendmsg</methodname> <methodparam><type>resource</type><parameter>socket</parameter></methodparam> <methodparam><type>resource</type><parameter>iovec</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></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-sendmsg"> + <refnamediv> + <refname>socket_sendmsg</refname> + <refpurpose>Envoie un message à une socket, qu'elle soit orientée connexion ou pas </refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_sendmsg</methodname> + <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>resource</type><parameter>iovec</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></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-sendto.xml diff -u phpdoc-fr/reference/sockets/functions/socket-sendto.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-sendto.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-sendto.xml:1.3 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/functions/socket-sendto.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,116 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-sendto"> <refnamediv> <refname>socket_sendto</refname> <refpurpose> Envoie une message à une socket, qu'elle soit connectée ou pas </refpurpose> </refnamediv> <refsect1> <title>Description</title> <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> <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></methodparam> </methodsynopsis> &warn.experimental.func; <para> <function>socket_sendto</function> envoie <parameter>len</parameter> octets issus du buffer <parameter>buf</parameter> via la socket <parameter>socket</parameter>, vers le port <parameter>port</parameter>, à l'adresse <parameter>addr</parameter> </para> <para> Le paramètre <parameter>flags</parameter> peut prendre l'une des valeurs suivantes : <table> <title>Valeurs possibles pour <parameter>flags</parameter></title> <tgroup cols="2"> <tbody> <row> <entry><literal>0x1</literal></entry> <entry> Traite les données OOB (out-of-band). </entry> </row> <row> <entry><literal>0x2</literal></entry> <entry> Traite le message entrant (peek). </entry> </row> <row> <entry><literal>0x4</literal></entry> <entry> Ignore le routage, utilise une interface directe. </entry> </row> <row> <entry><literal>0x8</literal></entry> <entry> Les données complètent l'enregistrement. </entry> </row> <row> <entry><literal>0x100</literal></entry> <entry> Les données complètent la transaction. </entry> </row> </tbody> </tgroup> </table> </para> <example> <title>Exemple avec <function>socket_sendto</function></title> <programlisting role="php"><![CDATA[<?php $sh = socket_create(AF_INET,SOCK_STREAM,SOL_TCP); if (socket_bind($sh, '127.0.0.1', 4242)) { echo "Socket connectée correctement"; } $buf = 'Test Message'; $len = strlen($buf); if (socket_sendto($sh, $buf, $len, 0x100, '192.168.0.2', 4242) !== FALSE) { echo "Message envoyé correctement"; } socket_close($sh);?>]]> </programlisting> </example> <para> Voir aussi <function>socket_send</function> et <function>socket_sendmsg</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-sendto"> + <refnamediv> + <refname>socket_sendto</refname> + <refpurpose> + Envoie une message à une socket, qu'elle soit connectée ou pas + </refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <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> + <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></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + <function>socket_sendto</function> envoie <parameter>len</parameter> + octets issus du buffer <parameter>buf</parameter> via la socket + <parameter>socket</parameter>, vers le port <parameter>port</parameter>, + à l'adresse <parameter>addr</parameter> + </para> + <para> + Le paramètre <parameter>flags</parameter> peut prendre l'une des + valeurs suivantes : + <table> + <title>Valeurs possibles pour <parameter>flags</parameter></title> + <tgroup cols="2"> + <tbody> + <row> + <entry><literal>0x1</literal></entry> + <entry> + Traite les données OOB (out-of-band). + </entry> + </row> + <row> + <entry><literal>0x2</literal></entry> + <entry> + Traite le message entrant (peek). + </entry> + </row> + <row> + <entry><literal>0x4</literal></entry> + <entry> + Ignore le routage, utilise une interface directe. + </entry> + </row> + <row> + <entry><literal>0x8</literal></entry> + <entry> + Les données complètent l'enregistrement. + </entry> + </row> + <row> + <entry><literal>0x100</literal></entry> + <entry> + Les données complètent la transaction. + </entry> + </row> + </tbody> + </tgroup> + </table> + </para> + <example> + <title>Exemple avec <function>socket_sendto</function></title> + <programlisting role="php"> +<![CDATA[ +<?php + $sh = socket_create(AF_INET,SOCK_STREAM,SOL_TCP); + if (socket_bind($sh, '127.0.0.1', 4242)) { + echo "Socket connectée correctement"; + } + $buf = 'Test Message'; + $len = strlen($buf); + if (socket_sendto($sh, $buf, $len, 0x100, '192.168.0.2', 4242) !== FALSE) { + echo "Message envoyé correctement"; + } + socket_close($sh); +?> +]]> + </programlisting> + </example> + <para> + Voir aussi + <function>socket_send</function> et + <function>socket_sendmsg</function>. + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-set-nonblock.xml diff -u phpdoc-fr/reference/sockets/functions/socket-set-nonblock.xml:1.2 phpdoc-fr/reference/sockets/functions/socket-set-nonblock.xml:1.3 --- phpdoc-fr/reference/sockets/functions/socket-set-nonblock.xml:1.2 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-set-nonblock.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,41 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-set-nonblock"> <refnamediv> <refname>socket_set_nonblock</refname> <refpurpose>Sélectionne le mode non bloquant d'un descripteur de fichier</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_set_nonblock</methodname> <methodparam><type>resource</type><parameter>socket</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-set-nonblock"> + <refnamediv> + <refname>socket_set_nonblock</refname> + <refpurpose>Sélectionne le mode non bloquant d'un descripteur de fichier</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_set_nonblock</methodname> + <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-set-option.xml diff -u phpdoc-fr/reference/sockets/functions/socket-set-option.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-set-option.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-set-option.xml:1.3 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/functions/socket-set-option.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,50 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.3 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-set-option"> <refnamediv> <refname>socket_set_option</refname> <refpurpose>Modifie les options de socket</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_set_option</methodname> <methodparam><type>resource</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> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> <note> <para> Cette fonction était appelée <literal>socket_setopt()</literal> avant PHP 4.3.0. </para> </note> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.3 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-set-option"> + <refnamediv> + <refname>socket_set_option</refname> + <refpurpose>Modifie les options de socket</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_set_option</methodname> + <methodparam><type>resource</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> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + <note> + <para> + Cette fonction était appelée <literal>socket_setopt()</literal> avant + PHP 4.3.0. + </para> + </note> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-shutdown.xml diff -u phpdoc-fr/reference/sockets/functions/socket-shutdown.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-shutdown.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-shutdown.xml:1.3 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/functions/socket-shutdown.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,72 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-shutdown"> <refnamediv> <refname>socket_shutdown</refname> <refpurpose>Eteind une socket en lecture et/ou écriture</refpurpose> </refnamediv> <refsect1> <title>Description</title> <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></methodparam> </methodsynopsis> &warn.experimental.func; <para> <function>socket_shutdown</function> vous permet d'empêcher les données entrantes ou sortantes ou les deux (par défaut), d'être émise via la socket <parameter>socket</parameter> </para> <para> La valeur de <parameter>how</parameter> peut être l'une des suivantes : <table> <title>Valeurs possibles pour <parameter>how</parameter></title> <tgroup cols="2"> <tbody> <row> <entry><literal>0</literal></entry> <entry> Empêche la lecture de la socket </entry> </row> <row> <entry><literal>1</literal></entry> <entry> Empêche l'écriture de la socket </entry> </row> <row> <entry><literal>2</literal></entry> <entry> Empêche l'écriture et la lecture de la socket </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-shutdown"> + <refnamediv> + <refname>socket_shutdown</refname> + <refpurpose>Eteind une socket en lecture et/ou écriture</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <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></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + <function>socket_shutdown</function> vous permet d'empêcher les données + entrantes ou sortantes ou les deux (par défaut), d'être émise via + la socket <parameter>socket</parameter> + </para> + <para> + La valeur de <parameter>how</parameter> peut être l'une des suivantes : + <table> + <title>Valeurs possibles pour <parameter>how</parameter></title> + <tgroup cols="2"> + <tbody> + <row> + <entry><literal>0</literal></entry> + <entry> + Empêche la lecture de la socket + </entry> + </row> + <row> + <entry><literal>1</literal></entry> + <entry> + Empêche l'écriture de la socket + </entry> + </row> + <row> + <entry><literal>2</literal></entry> + <entry> + Empêche l'écriture et la lecture de la socket + </entry> + </row> + </tbody> + </tgroup> + </table> + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-strerror.xml diff -u phpdoc-fr/reference/sockets/functions/socket-strerror.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-strerror.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-strerror.xml:1.3 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/functions/socket-strerror.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,81 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.4 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.8 --> <refentry id="function.socket-strerror"> <refnamediv> <refname>socket_strerror</refname> <refpurpose>Retourne une chaîne décrivant un message d'erreur</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>string</type><methodname>socket_strerror</methodname> <methodparam><type>int</type><parameter>errno</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> <function>socket_strerror</function> prend un code d'erreur comme paramètre <parameter>errno</parameter>. Cette valeur est souvent retournée par la fonction <function>socket_last_error</function>. La fonction retourne le message d'erreur correspondant. Cela rend plus facile la compréhension des problèmes survenus. Par exemple, au lieu d'avoir à rechercher un fichier système dans lequel il y a l'explication de '-111', vous avez juste à le passer à <function>socket_strerror</function>, qui vous dira ce qui c'est passé. </para> <para> <example> <title>Exemple avec <function>socket_strerror</function></title> <programlisting role="php"><![CDATA[<?phpif (false == ($socket = @socket_create(AF_INET, SOCK_STREAM, 0))) { echo "socket_create() a échoué : raison : " . socket_strerror(socket_last_error()) . "\n";} if (false == (@socket_bind($socket, '127.0.0.1', 80))) { echo "socket_bind() a échoué : raison : " . socket_strerror(socket_last_error($socket)) . "\n";}?>]]> </programlisting> <para> L'affichage attendu pour l'exemple du dessus (en supposant que vous essayer d'exécuter le script sans les droits de root) : <screen> socket_bind() a échoué : raison : Permission denied </screen> </para> </example> </para> <para> Voir aussi <function>socket_accept</function>, <function>socket_bind</function>, <function>socket_connect</function>, <function>socket_listen</function> et <function>socket_create</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.4 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.8 --> + <refentry id="function.socket-strerror"> + <refnamediv> + <refname>socket_strerror</refname> + <refpurpose>Retourne une chaîne décrivant un message d'erreur</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>string</type><methodname>socket_strerror</methodname> + <methodparam><type>int</type><parameter>errno</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + <function>socket_strerror</function> prend un code d'erreur comme paramètre + <parameter>errno</parameter>. Cette valeur est souvent retournée par la + fonction <function>socket_last_error</function>. La fonction retourne + le message d'erreur correspondant. Cela rend plus facile la compréhension + des problèmes survenus. Par exemple, au lieu d'avoir à rechercher + un fichier système dans lequel il y a l'explication de '-111', + vous avez juste à le passer à <function>socket_strerror</function>, qui + vous dira ce qui c'est passé. + </para> + <para> + <example> + <title>Exemple avec <function>socket_strerror</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +if (false == ($socket = @socket_create(AF_INET, SOCK_STREAM, 0))) { + echo "socket_create() a échoué : raison : " . socket_strerror(socket_last_error()) . "\n"; +} + +if (false == (@socket_bind($socket, '127.0.0.1', 80))) { + echo "socket_bind() a échoué : raison : " . socket_strerror(socket_last_error($socket)) . "\n"; +} +?> +]]> + </programlisting> + <para> + L'affichage attendu pour l'exemple du dessus (en supposant que + vous essayer d'exécuter le script sans les droits de root) : + <screen> + socket_bind() a échoué : raison : Permission denied + </screen> + </para> + </example> + </para> + <para> + Voir aussi + <function>socket_accept</function>, + <function>socket_bind</function>, + <function>socket_connect</function>, + <function>socket_listen</function> et + <function>socket_create</function>. + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-write.xml diff -u phpdoc-fr/reference/sockets/functions/socket-write.xml:1.3 phpdoc-fr/reference/sockets/functions/socket-write.xml:1.4 --- phpdoc-fr/reference/sockets/functions/socket-write.xml:1.3 Mon Jun 9 12:03:05 2003 +++ phpdoc-fr/reference/sockets/functions/socket-write.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,88 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.3 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-write"> <refnamediv> <refname>socket_write</refname> <refpurpose>Ecrit dans une socket</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</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></methodparam> </methodsynopsis> &warn.experimental.func; <para> <function>socket_write</function> écrit dans la socket <parameter>socket</parameter> les données du buffer <parameter>buffer</parameter>. </para> <para> Le paramètre optionnel <parameter>length</parameter> peut spécifier explicitement la taille des données qui doivent être écrites. Si cette longueur est plus grande que la taille du buffer, elle sera ramenée automatiquemetn à la taille du buffer lui-même. </para> <para> <function>socket_write</function> retourne le nombre d'octets qui ont pus êter écrits dans la socket, ou bien &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. </para> <note> <para> <function>socket_write</function> n'écrit pas nécessaire tous les octets du buffer fourni. Il est valide que, suivant certaines configuration de buffer réseau, que seulement une certaine quantité de données, même un octets, soit écrit, même si votre buffer est plus grand. Vous devez alors vous assurer que vous n'avez pas oublié de transmettre le reste de vos données. </para> </note> <note> <para> Il est parfaitement valide pour <function>socket_write</function> de retourner zéro, ce qui signifie qu'aucun octet n'a été écrit. Soyez bien sûr d'utiliser l'opérateur <literal>===</literal> pour comparer le retour de la fonction avec &false;, et détecter un cas d'erreur. </para> </note> <para> Voir aussi <function>socket_accept</function>, <function>socket_bind</function>, <function>socket_connect</function>, <function>socket_listen</function>, <function>socket_read</function> et <function>socket_strerror</function>. </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.3 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-write"> + <refnamediv> + <refname>socket_write</refname> + <refpurpose>Ecrit dans une socket</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>int</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></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + <function>socket_write</function> écrit dans la socket + <parameter>socket</parameter> les données du buffer + <parameter>buffer</parameter>. + </para> + <para> + Le paramètre optionnel <parameter>length</parameter> peut spécifier + explicitement la taille des données qui doivent être écrites. Si cette + longueur est plus grande que la taille du buffer, elle sera ramenée + automatiquemetn à la taille du buffer lui-même. + </para> + <para> + <function>socket_write</function> retourne le nombre d'octets qui ont + pus êter écrits dans la socket, ou bien &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. + </para> + <note> + <para> + <function>socket_write</function> n'écrit pas nécessaire tous + les octets du buffer fourni. Il est valide que, suivant certaines + configuration de buffer réseau, que seulement une certaine quantité + de données, même un octets, soit écrit, même si votre buffer + est plus grand. Vous devez alors vous assurer que vous n'avez + pas oublié de transmettre le reste de vos données. + </para> + </note> + <note> + <para> + Il est parfaitement valide pour <function>socket_write</function> de + retourner zéro, ce qui signifie qu'aucun octet n'a été écrit. Soyez + bien sûr d'utiliser l'opérateur <literal>===</literal> pour + comparer le retour de la fonction avec &false;, et détecter un + cas d'erreur. + </para> + </note> + <para> + Voir aussi + <function>socket_accept</function>, + <function>socket_bind</function>, + <function>socket_connect</function>, + <function>socket_listen</function>, + <function>socket_read</function> et + <function>socket_strerror</function>. + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Index: phpdoc-fr/reference/sockets/functions/socket-writev.xml diff -u phpdoc-fr/reference/sockets/functions/socket-writev.xml:1.2 phpdoc-fr/reference/sockets/functions/socket-writev.xml:1.3 --- phpdoc-fr/reference/sockets/functions/socket-writev.xml:1.2 Fri Aug 16 22:19:21 2002 +++ phpdoc-fr/reference/sockets/functions/socket-writev.xml Wed Jun 11 10:08:51 2003 @@ -1 +1,42 @@ -<?xml version="1.0" encoding="iso-8859-1"?><!-- $Revision: 1.2 $ --><!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> <refentry id="function.socket-writev"> <refnamediv> <refname>socket_writev</refname> <refpurpose>Ecrit des données dans un descripteur de fichier, fd, en utilisant le tableau scatter-gather définie par iovec_id </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>socket_writev</methodname> <methodparam><type>resource</type><parameter>socket</parameter></methodparam> <methodparam><type>resource</type><parameter>iovec_id</parameter></methodparam> </methodsynopsis> &warn.experimental.func; <para> &warn.undocumented.func; </para> </refsect1> </refentry><!-- Keep this comment at the end of the fileLocal variables:mode: sgmlsgml-omittag:tsgml-shorttag:tsgml-minimize-attributes:nilsgml-always-quote-attributes:tsgml-indent-step:1sgml-indent-data:tindent-tabs-mode:nilsgml-parent-document:nilsgml-default-dtd-file:"../../../../manual.ced"sgml-exposed-tags:nilsgml-local-catalogs:nilsgml-local-ecat-files:nilEnd:vim600: syn=xml fen fdm=syntax fdl=2 sivim: et tw=78 syn=sgmlvi: ts=1 sw=1--> \ No newline at end of file +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- $Revision: 1.2 $ --> +<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 --> + <refentry id="function.socket-writev"> + <refnamediv> + <refname>socket_writev</refname> + <refpurpose>Ecrit des données dans un descripteur de fichier, fd, en utilisant le tableau scatter-gather définie par iovec_id </refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>socket_writev</methodname> + <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>resource</type><parameter>iovec_id</parameter></methodparam> + </methodsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../../manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +-->