cvs: phpdoc-it /reference/sockets/functions socket-sendto.xml

From: Date: Fri, 06 Jun 2003 20:15:22 +0000
Subject: cvs: phpdoc-it /reference/sockets/functions socket-sendto.xml
Groups: php.doc.it 
Request: Send a blank email to doc-it+get-407@lists.php.net to get a copy of this message
darvina Fri Jun 6 16:15:22 2003 EDT Modified files: /phpdoc-it/reference/sockets/functions socket-sendto.xml Log: Update to En 1.3 Index: phpdoc-it/reference/sockets/functions/socket-sendto.xml diff -u phpdoc-it/reference/sockets/functions/socket-sendto.xml:1.2 phpdoc-it/reference/sockets/functions/socket-sendto.xml:1.3 --- phpdoc-it/reference/sockets/functions/socket-sendto.xml:1.2 Wed Apr 17 03:08:41 2002 +++ phpdoc-it/reference/sockets/functions/socket-sendto.xml Fri Jun 6 16:15:22 2003 @@ -1,8 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- splitted from ./it/functions/sockets.xml, last change in rev 1.4 --> -<!-- last change to 'socket-sendto' in en/ tree in rev 1.27 --> -<!-- EN-Revision: 1.2 Maintainer: darvina Status: ready --> -<!-- OLD-Revision: 1.34/EN.1.27 --> +<!-- EN-Revision: 1.3 Maintainer: darvina Status: ready --> <refentry id="function.socket-sendto"> <refnamediv> <refname>socket_sendto</refname> @@ -21,7 +18,75 @@ </methodsynopsis> &warn.experimental.func; <para> - &warn.undocumented.func; + La funzione <function>socket_sendto</function> invia + <parameter>len</parameter> bytes dal buffer <parameter>buf</parameter> + attraverso il socket <parameter>socket</parameter> alla porta + <parameter>port</parameter> dell'indirizzo <parameter>addr</parameter> + </para> + <para> + Il valore ammessi per <parameter>flags</parameter> può essere uno dei + seguenti: + <table> + <title>valori possibili per <parameter>flags</parameter></title> + <tgroup cols="2"> + <tbody> + <row> + <entry><literal>0x1</literal></entry> + <entry> + Elabora dati OOB (fuori banda). + </entry> + </row> + <row> + <entry><literal>0x2</literal></entry> + <entry> + Preleva il messaggio in arrivo. + </entry> + </row> + <row> + <entry><literal>0x4</literal></entry> + <entry> + Ignora il routing, usa l'interfaccia diretta. + </entry> + </row> + <row> + <entry><literal>0x8</literal></entry> + <entry> + I dati completano il record. + </entry> + </row> + <row> + <entry><literal>0x100</literal></entry> + <entry> + I dati completano al transazione. + </entry> + </row> + </tbody> + </tgroup> + </table> + </para> + <example> + <title>Esempio di <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 agganciato correttamente"; + } + $buf = 'Test Message'; + $len = strlen($buf); + if (socket_sendto($sh, $buf, $len, 0x100, '192.168.0.2', 4242) !== FALSE) { + echo "Messaggio inviato correttamente"; + } + socket_close($sh); +?> +]]> + </programlisting> + </example> + <para> + Vedere anche + <function>socket_send</function> e + <function>socket_sendmsg</function>. </para> </refsect1> </refentry>

« previous php.doc.it (#407) next »