roundcubemail/program/lib/Roundcube/rcube_imap_generic.php
protected function readBytes($bytes)
    {
        $data = '';
        $len  = 0;

        while ($len < $bytes && !$this->eof()) {
            $d = fread($this->fp, $bytes-$len);
            if ($this->debug) {
                $this->debug('S: '. $d);
            }
            $data .= $d;
            $data_len = strlen($data);
            if ($len == $data_len) {
                break; // nothing was read -> exit to avoid apache lockups
            }
            $len = $data_len;
        }

        return $data;
    }
protected function readBytes($bytes)
    {
        $data = '';
        $len  = 0;

        while ($len < $bytes && !$this->eof()) {
            $d = fread($this->fp, $bytes-$len);
            if ($this->debug) {
                $this->debug('S: '. $d);
            }
            $data .= $d;
            $data_len = strlen($data);
            if ($len == $data_len) {
                break; // nothing was read -> exit to avoid apache lockups
            }
            $len = $data_len;
        }

        return $data;
    }
protected function readBytes ( $ bytes ) { $ data = '' ; $ len = 0 ; while ( $ len < $ bytes && ! $ this -> eof ( ) ) { $ d = fread ( $ this -> fp , $ bytes - $ len ) ; if ( $ this -> debug ) { $ this -> debug ( 'S: ' . $ d ) ; } $ data .= $ d ; $ data_len = strlen ( $ data ) ; if ( $ len == $ data_len ) { break ; // nothing was read -> exit to avoid apache lockups } $ len = $ data_len ; } return $ data ; }
Reads specified number of bytes from the connection stream

@param int $bytes Number of bytes to get

@return string Response text
Reads specified number of bytes from the connection stream