public function readLine()
    {
        do {
            $line = rtrim(fgets($this->socket));

            // server must have dropped the connection
            if ($line === '' && feof($this->socket)) {
                $this->close();

                return false;
            }
        } while ($line === '');

        return $line;
    }
public function readLine()
    {
        do {
            $line = rtrim(fgets($this->socket));

            // server must have dropped the connection
            if ($line === '' && feof($this->socket)) {
                $this->close();

                return false;
            }
        } while ($line === '');

        return $line;
    }
public function readLine ( ) { do { $ line = rtrim ( fgets ( $ this -> socket ) ) ; // server must have dropped the connection if ( $ line === '' && feof ( $ this -> socket ) ) { $ this -> close ( ) ; return false ; } } while ( $ line === '' ) ; return $ line ; }
Read the next line from the stream

@return string
Read the next line from the stream