note 18478 added to function.socket-set-nonblock
| From: | alan at akbkhome dot com | Date: | Thu, 24 Jan 2002 15:03:59 +0000 |
| Subject: | note 18478 added to function.socket-set-nonblock | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-25781@lists.php.net to get a copy of this message | ||
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.
--
http://www.php.net/manual/en/function.socket-set-nonblock.php
http://master.php.net/manage/user-notes.php?action=edit+18478
http://master.php.net/manage/user-notes.php?action=delete+18478
http://master.php.net/manage/user-notes.php?action=reject+18478