src/Proxy/SOCKS.php
protected function read($len)
    {
        $contents   = "";
        $clen       = 0;
        while (!feof($this->socket) && $clen < $len) {
            $read = fread($this->socket, $len - $clen);
            if ($read === false) {
                throw new \Erebot\Exception('Connection closed by proxy');
            }
            $contents  .= $read;
            $clen       = strlen($contents);
        }
        return $contents;
    }
protected function read($len)
    {
        $contents   = "";
        $clen       = 0;
        while (!feof($this->socket) && $clen < $len) {
            $read = fread($this->socket, $len - $clen);
            if ($read === false) {
                throw new \Erebot\Exception('Connection closed by proxy');
            }
            $contents  .= $read;
            $clen       = strlen($contents);
        }
        return $contents;
    }
protected function read ( $ len ) { $ contents = "" ; $ clen = 0 ; while ( ! feof ( $ this -> socket ) && $ clen < $ len ) { $ read = fread ( $ this -> socket , $ len - $ clen ) ; if ( $ read === false ) { throw new \ Erebot \ Exception ( 'Connection closed by proxy' ) ; } $ contents .= $ read ; $ clen = strlen ( $ contents ) ; } return $ contents ; }
Reads some data from the proxy server.

\param int $len
Number of bytes to read from the proxy server.

\retval string
Actual data read.
Reads some data from the proxy server .