[PHP-DOC] cvs: phpdoc-it /reference/sockets/functions socket-getpeername.xml From: Andrioli Darvin (darvin.andrioli <email protected>)
Date: 06/02/02

darvina Sun Jun 2 08:53:48 2002 EDT

  Modified files:
    /phpdoc-it/reference/sockets/functions socket-getpeername.xml
  Log:
  Update to En 1.5
  
Index: phpdoc-it/reference/sockets/functions/socket-getpeername.xml
diff -u phpdoc-it/reference/sockets/functions/socket-getpeername.xml:1.2 phpdoc-it/reference/sockets/functions/socket-getpeername.xml:1.3
--- phpdoc-it/reference/sockets/functions/socket-getpeername.xml:1.2 Wed Apr 17 03:08:39 2002
+++ phpdoc-it/reference/sockets/functions/socket-getpeername.xml Sun Jun 2 08:53:48 2002
@@ -1,24 +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-getpeername' in en/ tree in rev 1.27 -->
-<!-- EN-Revision: 1.2 Maintainer: darvina Status: ready -->
+<!-- EN-Revision: 1.5 Maintainer: darvina Status: ready -->
 <!-- OLD-Revision: 1.34/EN.1.27 -->
   <refentry id="function.socket-getpeername">
    <refnamediv>
     <refname>socket_getpeername</refname>
- <refpurpose>Dato un fd, memorizza la stringa rappresentante sa.sin_addr ed il valore di sa.sin_port in addr e port, descrivendo il lato remoto di un socket</refpurpose>
+ <refpurpose>
+ Interroga il lato remoto di un dato socket per ottenere o la combinazione host/porta
+ od un percorso Unix, in base al tipo di socket
+ </refpurpose>
    </refnamediv>
    <refsect1>
     <title>Descrizione</title>
      <methodsynopsis>
       <type>bool</type><methodname>socket_getpeername</methodname>
       <methodparam><type>resource</type><parameter>socket</parameter></methodparam>
- <methodparam><type>string</type><parameter>&amp;addr</parameter></methodparam>
- <methodparam choice="opt"><type>int</type><parameter>&amp;port</parameter></methodparam>
+ <methodparam><type>string</type><parameter>&amp;indirizzo</parameter></methodparam>
+ <methodparam choice="opt"><type>int</type><parameter>&amp;porta</parameter></methodparam>
      </methodsynopsis>
      &warn.experimental.func;
     <para>
- &warn.undocumented.func;
+ Se il socket dato è di tipo <constant>AF_INET</constant>,
+ <function>socket_getpeername</function> restituisce l'<emphasis>indirizzo IP</emphasis>
+ remoto nella notazione a quattro cifre con punto (ad esempio
+ <literal>127.0.0.1</literal>) nel parametro <parameter>indirizzo</parameter>
+ e, se presente il parametro opzionale <parameter>porta</parameter>,
+ anche la porta associata.
+ </para>
+ <para>
+ Se il socket dato è di tipo <constant>AF_UNIX</constant>,
+ <function>socket_getpeername</function> restituirà un percorso Unix
+ (ad esempio <literal>/var/run/daemon.sock</literal>) nel
+ parametro <parameter>indirizzo</parameter>.
+ </para>
+ <para>
+ &return.success; <function>socket_getpeername</function> può anche restituire
+ &false; se il tipo di socket non è <constant>AF_INET</constant> o
+ <constant>AF_UNIX</constant>, in questo caso l'ultimo codice di errore del socket
+ <emphasis>non</emphasis> viene aggiornato.
+ </para>
+ <para>
+ Vedere anche
+ <function>socket_getpeername</function>,
+ <function>socket_last_error</function> e
+ <function>socket_strerror</function>.
     </para>
    </refsect1>
   </refentry>