Conversion of socket_fd to PHP 4.2 system?
| From: | Michael Worsham | Date: | Mon, 05 Aug 2002 12:40:31 +0000 |
| Subject: | Conversion of socket_fd to PHP 4.2 system? | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-86529@lists.php.net to get a copy of this message | ||
A past programmer developed a piece of code using the PHP 4.1.1 series to use the socket_fd_* code.
However, with the release of PHP 4.2, the 'fd' code is no longer valid.
$fdr = socket_fd_alloc();
$fdz = socket_fd_alloc();
function socket_canread($sock) {
global $fdr, $fdz;
socket_fd_set($fdr, $sock);
socket_select($fdr, $fdz, $fdz, 0, 10);
$r = socket_fd_isset($fdr, $sock);
socket_fd_zero($fdr);
socket_fd_zero($fdz);
return $r;
}
Can someone help me translate the following piece to use the newer PHP 4.2 socket code?
Thanks.
-- M
__________________________________________________________
Win a First Class Trip to Hawaii to Vacation Elvis Style!
http://r.lycos.com/r/sagel_mail/http://www.elvis.lycos.com/sweepstakes