opensrs\Ops::socketStatus PHP 메소드

socketStatus() 공개 메소드

Checks a socket for timeout or EOF.
public socketStatus ( &$fh ) : boolean
리턴 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;
    }