'Fills internal buffer with data from socket and returns first found line.
@type peek: Bool
@param peek: Keeps line in the buffer if true
@rtype: str
@return: First found line'

def recvl(self, peek=False):

    while True:
        i = self._b.find(CRLF)
        if (i == (-1)):
            self._b += self.recv(1024)
        else:
            line = self._b[:i]
            if (not peek):
                self._b = self._b[(i + 2):]
            return line
