Re: sockets

From: Date: Sun, 28 Apr 2002 23:31:08 +0000
Subject: Re: sockets
References: 1 2 3 4  Groups: php.dev 
Request: Send a blank email to php-dev+get-83463@lists.php.net to get a copy of this message
One way to find which socket has died, if any, is to loop through each socket in the three sets (read/write/exceptions) and do a select() on each one to see if you can read with a timeout of 0. (The bad one being the one where select() returns -1, I think.) J Steve Meyers wrote: > There's only one thing it's missing -- the equivalent of > socket_get_status(), which is not part of the extension, despite the name. > If I set my socket to nonblocking, the only way to tell if it has died is > to try to write to it, which isn't always a desirable thing to do :) > > Unless there's another way that I just don't understand. >

« previous php.dev (#83463) next »