note 18478 deleted from function.socket-set-nonblock by nlopess
| From: | nlopess@php.net | Date: | Sun, 06 Nov 2005 22:39:56 +0000 |
| Subject: | note 18478 deleted from function.socket-set-nonblock by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-98175@lists.php.net to get a copy of this message | ||
Note Submitter: alan at akbkhome dot com
----
if you are using non blocking sockets, you need to be aware that
socket_accept will return 0, so you need to check what it returns is_resource() to see if it
connected.
when using socket_read, you need to call socket_last_error($sock). If the return value is 11 (I
assume EAGAIN), then It means that there is no data in the queue, but the socket is still alive.