def readline(self):
    buf = self._buffer
    buf.seek(self.bytes_read)
    data = buf.readline()
    while (not data.endswith(SYM_CRLF)):
        self._read_from_socket()
        buf.seek(self.bytes_read)
        data = buf.readline()
    self.bytes_read += len(data)
    if (self.bytes_read == self.bytes_written):
        self.purge()
    return data[:(- 2)]
def readline(self):
    buf = self._buffer
    buf.seek(self.bytes_read)
    data = buf.readline()
    while (not data.endswith(SYM_CRLF)):
        self._read_from_socket()
        buf.seek(self.bytes_read)
        data = buf.readline()
    self.bytes_read += len(data)
    if (self.bytes_read == self.bytes_written):
        self.purge()
    return data[:(- 2)]