cvs: phpdoc-it /reference/sockets/functions socket-write.xml
| From: | Andrioli Darvin | Date: | Sun, 02 Jun 2002 12:51:20 +0000 |
| Subject: | cvs: phpdoc-it /reference/sockets/functions socket-write.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969346129@lists.php.net to get a copy of this message | ||
darvina Sun Jun 2 08:51:20 2002 EDT
Modified files:
/phpdoc-it/reference/sockets/functions socket-write.xml
Log:
Update to En 1.3
Index: phpdoc-it/reference/sockets/functions/socket-write.xml
diff -u phpdoc-it/reference/sockets/functions/socket-write.xml:1.2
phpdoc-it/reference/sockets/functions/socket-write.xml:1.3
--- phpdoc-it/reference/sockets/functions/socket-write.xml:1.2 Wed Apr 17 03:08:42 2002
+++ phpdoc-it/reference/sockets/functions/socket-write.xml Sun Jun 2 08:51:20 2002
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- splitted from ./it/functions/sockets.xml, last change in rev 1.4 -->
<!-- last change to 'socket-write' in en/ tree in rev 1.27 -->
-<!-- EN-Revision: 1.2 Maintainer: darvina Status: ready -->
+<!-- EN-Revision: 1.3 Maintainer: darvina Status: ready -->
<!-- OLD-Revision: 1.34/EN.1.27 -->
<refentry id="function.socket-write">
<refnamediv>
@@ -12,26 +12,54 @@
<title>Descrizione</title>
<methodsynopsis>
<type>int</type><methodname>socket_write</methodname>
-
<methodparam><type>resource</type><parameter>socket_des</parameter></methodparam>
-
<methodparam><type>string</type><parameter>&buffer</parameter></methodparam>
-
<methodparam><type>int</type><parameter>length</parameter></methodparam>
+
<methodparam><type>resource</type><parameter>socket</parameter></methodparam>
+
<methodparam><type>string</type><parameter>buffer</parameter></methodparam>
+ <methodparam
choice="opt"><type>int</type><parameter>lunghezza</parameter></methodparam>
</methodsynopsis>
- &warn.experimental.func;
+ &warn.experimental.func;
<para>
La funzione <function>socket_write</function> scrive sul socket
- <parameter>socket_des</parameter> un numero di byte indicato da
- <parameter>length</parameter> tratti dal campo
- <parameter>&buffer</parameter>.
+ <parameter>socket</parameter> i dati tratti dal campo
+ <parameter>buffer</parameter>.
</para>
<para>
+ Il parametro opzionale <parameter>lunghezza</parameter> può specificare un
+ numero alternativo di bytes da scrivere nel socket. Se questa dimensione è maggiore
+ della lunghezza di buffer, questa viene, in modo silenzioso, ridotta alla
+ lunghezza di buffer.
+ </para>
+ <para>
+ La funzione restituisce il numero di bytes scritti con successo nel socket, oppure
+ &false; se si verifica un errore. Il codice di errore può essere rilevato con
+ <function>socket_last_error</function>. Passando questo codice alla funzione
+ <function>socket_strerror</function> si ottiene una spiegazione
+ dell'errore.
+ </para>
+ <note>
+ <para>
+ <function>socket_write</function> non scrive necessariamente tutti i byte
+ da un dato buffer. E' ammesso che, in base alle dimensioni dei buffer della rete
+ ecc., soltanto un certo ammontare di dati, anche un solo byte, sia scritto
+ nel socket, nonostante il buffer sia di dimensioni maggiori. Si deve prestare attenzione
+ a ciò per evitare di non inviare il resto dei dati.
+ </para>
+ </note>
+ <note>
+ <para>
+ E' regolare per la funzione <function>socket_write</function> restituire
+ zero, ciò significa che non è stato scritto alcun byte. Si utilizzi
+ l'operatore <literal>===</literal> per testare il caso di &false;
+ nelle situazioni di errore.
+ </para>
+ </note>
+ <para>
Vedere anche
<function>socket_accept</function>,
<function>socket_bind</function>,
<function>socket_connect</function>,
<function>socket_listen</function>,
- <function>socket_read</function>,
- <function>socket_strerror</function> e
- <function>socket_get_status</function>.
+ <function>socket_read</function> e
+ <function>socket_strerror</function>.
</para>
</refsect1>
</refentry>