public socketStatus ( &$fh ) : boolean | ||
return | boolean | true if the socket has timed out or is EOF |
public function socketStatus(&$fh)
{
$return = false;
if (is_resource($fh)) {
$temp = socket_get_status($fh);
if ($temp['timed_out']) {
$return = true;
}
if ($temp['eof']) {
$return = true;
}
unset($temp);
}
return $return;
}