roundcubemail/program/lib/Roundcube/rcube_imap_generic.php
protected function readLine($size = 1024)
    {
        $line = '';

        if (!$size) {
            $size = 1024;
        }

        do {
            if ($this->eof()) {
                return $line ?: null;
            }

            $buffer = fgets($this->fp, $size);

            if ($buffer === false) {
                $this->closeSocket();
                break;
            }

            if ($this->debug) {
                $this->debug('S: '. rtrim($buffer));
            }

            $line .= $buffer;
        }
        while (substr($buffer, -1) != "\n");

        return $line;
    }
protected function readLine($size = 1024)
    {
        $line = '';

        if (!$size) {
            $size = 1024;
        }

        do {
            if ($this->eof()) {
                return $line ?: null;
            }

            $buffer = fgets($this->fp, $size);

            if ($buffer === false) {
                $this->closeSocket();
                break;
            }

            if ($this->debug) {
                $this->debug('S: '. rtrim($buffer));
            }

            $line .= $buffer;
        }
        while (substr($buffer, -1) != "\n");

        return $line;
    }
protected function readLine ( $ size = 1024 ) { $ line = '' ; if ( ! $ size ) { $ size = 1024 ; } do { if ( $ this -> eof ( ) ) { return $ line ? : null ; } $ buffer = fgets ( $ this -> fp , $ size ) ; if ( $ buffer === false ) { $ this -> closeSocket ( ) ; break ; } if ( $ this -> debug ) { $ this -> debug ( 'S: ' . rtrim ( $ buffer ) ) ; } $ line .= $ buffer ; } while ( substr ( $ buffer , - 1 ) != "\n" ) ; return $ line ; }
Reads line from the connection stream

@param int $size Buffer size

@return string Line of text response
Reads line from the connection stream