Re: sockets
| From: | Steve Meyers | Date: | Mon, 29 Apr 2002 16:14:02 +0000 |
| Subject: | Re: sockets | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-83493@lists.php.net to get a copy of this message | ||
On Sun, 2002-04-28 at 22:43, Jason Greene wrote:
> In the case of a socket you are selecting on has errored, the socket
> will show up as readable. You then can perform a socket_read/recv, and
> you should receive NULL (errored socket), then you can call
> socket_last_error to receive the errno.
>
Unless I'm just a really bad coder and have no idea what I'm doing, this
won't help. I tried using socket_last_error, but it returns the same
error code whether the socket has no data waiting (remember this is a
non-blocking socket) or if the socket has died. I can only tell if it
is dead by writing to the socket.
What I'd like to do is just find out if the socket is still alive.