public function readLine($endOfLine = Server::EOL)
    {
        $this->ensureConnected();
        $buffer = '';

        do {
            $buffer .= $this->read(self::MAX_SINGLE_RESPONSE_LENGTH);

            $eolPosition = strpos($buffer, $endOfLine);
        } while ($eolPosition === false);

        $this->readBuffer = substr($buffer, $eolPosition + strlen($endOfLine));
        return substr($buffer, 0, $eolPosition + strlen($endOfLine));
    }
public function readLine($endOfLine = Server::EOL)
    {
        $this->ensureConnected();
        $buffer = '';

        do {
            $buffer .= $this->read(self::MAX_SINGLE_RESPONSE_LENGTH);

            $eolPosition = strpos($buffer, $endOfLine);
        } while ($eolPosition === false);

        $this->readBuffer = substr($buffer, $eolPosition + strlen($endOfLine));
        return substr($buffer, 0, $eolPosition + strlen($endOfLine));
    }
public function readLine ( $ endOfLine = Server :: EOL ) { $ this -> ensureConnected ( ) ; $ buffer = '' ; do { $ buffer .= $ this -> read ( self :: MAX_SINGLE_RESPONSE_LENGTH ) ; $ eolPosition = strpos ( $ buffer , $ endOfLine ) ; } while ( $ eolPosition === false ) ; $ this -> readBuffer = substr ( $ buffer , $ eolPosition + strlen ( $ endOfLine ) ) ; return substr ( $ buffer , 0 , $ eolPosition + strlen ( $ endOfLine ) ) ; }
Reads data from the connected socket in chunks of MAX_SINGLE_RESPONSE_LENGTH

The MAX_SINGLE_RESPONSE_LENGTH should always capture at least the first line of a response, assuming the longest
possible response is the USING <tubename>\r\n response, which could be up to 208 bytes in length, for any valid
<tubename>. As a result, this function will, in reality, read some overflow of data for any response containing
data. This data is saved in a read-buffer, which `readData()` will read from first.

@see readData()

@param string $endOfLine
@return string
@throws SocketException
Reads data from the connected socket in chunks of MAX_SINGLE_RESPONSE_LENGTH