Logo Search packages:      
Sourcecode: egroupware-egw-pear version File versions  Download package

Net_Socket::readIPAddress (  ) 

Reads an IP Address and returns it in a dot formated string

public

Returns:
Dot formated string, or a PEAR_Error if not connected.

Definition at line 443 of file Socket.php.

    {
        if (!is_resource($this->fp)) {
            return $this->raiseError('not connected');
        }

        $buf = @fread($this->fp, 4);
        return sprintf("%s.%s.%s.%s", ord($buf[0]), ord($buf[1]),
                       ord($buf[2]), ord($buf[3]));
    }


Generated by  Doxygen 1.6.0   Back to index