note 44096 added to function.stream-socket-accept
| From: | scott at slerman dot net | Date: | Thu, 15 Jul 2004 04:25:47 +0000 |
| Subject: | note 44096 added to function.stream-socket-accept | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-73257@lists.php.net to get a copy of this message | ||
The timeout value is how long stream_socket_accept will listen for an incoming connection; if no
connection is attempted within the timeout, a warning will be generated saying that the accept timed
out. Most of the time, you want the socket to wait indefinitely, which (judging by this manual page)
appears to be the behavior if you leave out the timeout argument. Unfortunately, if you want the
address that's connecting to your server, you have to include a timeout value. To make the
socket wait indefinitely, use a timeout of -1, i.e. $connection_socket =
stream_socket_accept($listen_socket, -1, $remote_address);
----
Manual Page -- http://www.php.net/manual/en/function.stream-socket-accept.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+44096
Delete -- http://master.php.net/manage/user-notes.php?action=delete+44096&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+44096&report=yes
Search -- http://master.php.net/manage/user-notes.php