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

From: Date: Sun, 02 Jun 2002 12:50:10 +0000
Subject: cvs: phpdoc-it /reference/sockets/functions socket-read.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969346127@lists.php.net to get a copy of this message
darvina Sun Jun 2 08:50:10 2002 EDT Modified files: /phpdoc-it/reference/sockets/functions socket-read.xml Log: Update to En 1.3 Index: phpdoc-it/reference/sockets/functions/socket-read.xml diff -u phpdoc-it/reference/sockets/functions/socket-read.xml:1.2 phpdoc-it/reference/sockets/functions/socket-read.xml:1.3 --- phpdoc-it/reference/sockets/functions/socket-read.xml:1.2 Wed Apr 17 03:08:40 2002 +++ phpdoc-it/reference/sockets/functions/socket-read.xml Sun Jun 2 08:50:10 2002 @@ -1,36 +1,50 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!-- splitted from ./it/functions/sockets.xml, last change in rev 1.4 --> <!-- last change to 'socket-read' in en/ tree in rev 1.8 --> -<!-- EN-Revision: 1.2 Maintainer: darvina Status: ready --> +<!-- EN-Revision: 1.3 Maintainer: darvina Status: ready --> <!-- OLD-Revision: 1.34/EN.1.8 --> <refentry id="function.socket-read"> <refnamediv> <refname>socket_read</refname> - <refpurpose>Legge da un socket</refpurpose> + <refpurpose>Legge fino ad un massimo di byte predefiniti da un socket</refpurpose> </refnamediv> <refsect1> <title>Descrizione</title> <methodsynopsis> <type>string</type><methodname>socket_read</methodname> - <methodparam><type>resource</type><parameter>socket_des</parameter></methodparam> - <methodparam><type>int</type><parameter>length</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>type</parameter></methodparam> + <methodparam><type>resource</type><parameter>socket</parameter></methodparam> + <methodparam><type>int</type><parameter>lunghezza</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>tipo</parameter></methodparam> </methodsynopsis> - &warn.experimental.func; + &warn.experimental.func; <para> - La funzione <function>socket_read</function> legge un numero di byte, - indicati da <parameter>length</parameter>, da un socket <parameter>socket_des</parameter> + La funzione <function>socket_read</function> legge un numero massimo di byte, + indicato in <parameter>lunghezza</parameter>, da un socket <parameter>socket</parameter> creato dalla funzione <function>socket_accept</function>. In alternativa si possono usare i caratteri \n, \t o \0 per indicare - la fine della lettura. La funzione restituisce i dati oppure FALSE - se <function>socket_read</function> fallisce. + la fine della lettura (in base al parametro <parameter>tipo</parameter>, + vedere più avanti) </para> <para> - Il parametro opzionale <parameter>type</parameter> può assumere i seguenti valori: + La funzione restituisce i dati come una stringa in caso di successo, &false; su errore. + Il codice di errore può essere recuperato con <function>socket_last_error</function>. + Questo codice può essere passato a <function>socket_strerror</function> per ottenere + una descrizione dell'errore. + </para> + <note> + <para> + <function>socket_read</function> può restituire una stringa di lunghezza zero + indicante la fine della comunicazione (ad esempio il server remoto ha chiuso + la connessione). + </para> + </note> + <para> + Il parametro opzionale <parameter>tipo</parameter> può assumere i seguenti valori: <itemizedlist> <listitem> <simpara> - PHP_BINARY_READ - usa la funzione di sistema <function>socket_read</function> + PHP_BINARY_READ - usa la funzione di sistema <literal>read()</literal>. + Salvaguarda la lettura di dati binari (Default in PHP &gt;= 4.1.0) </simpara> </listitem> @@ -47,8 +61,8 @@ <function>socket_bind</function>, <function>socket_connect</function>, <function>socket_listen</function>, - <function>socket_strerror</function>, - <function>socket_get_status</function> e + <function>socket_last_error</function>, + <function>socket_strerror</function> e <function>socket_write</function>. </para> </refsect1>

« previous php.doc (#969346127) next »