ID:               38311
 Updated by:       [EMAIL PROTECTED]
 Reported By:      axelluttgens at swing dot be
-Status:           Open
+Status:           Feedback
 Bug Type:         Documentation problem
 Operating System: n/a
 PHP Version:      Irrelevant
 New Comment:

Can you please consult bug #21366?


Previous Comments:
------------------------------------------------------------------------

[2006-08-03 10:23:08] axelluttgens at swing dot be

Description:
------------
I really don't understand following sentence, appearing at
manual/en/function.socket-getpeername.php:

   Note:  socket_getpeername() should not be used with
   AF_UNIX sockets created with socket_accept(). Only
   sockets created with socket_connect() or a primary
   server socket following a call to socket_bind() will
   return meaningful values.

For example,
   $connection = socket_accept($endpoint);
   socket_getpeername($connection, $peer, $peerport);
works perfectly well (one gets client's address and port).

More generally, above excerpt tends to remove a good deal of the
generality of the getpeername(2) system call.

It seems that some kind of cut/paste errors occured while writing above
note. For example, perhaps should it have read:
   Note:  socket_getpeername() should not be used with
   AF_UNIX sockets created with socket_create(). Only
   sockets created with socket_connect() or a primary
   server socket following a call to socket_accept() will
   return meaningful values.
But even so, it would remain somewhat obscure.

HTH,
Axel



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=38311&edit=1

Reply via email to