'Consume a chunk of data and attempt to parse it.
@param data: A bytestring.
@type data: L{bytes}
@return: A two-tuple containing, in order, a
L{_interfaces.IProxyInfo} and any bytes fed to the
parser that followed the end of the header.  Both of these values
are None until a complete header is parsed.
@raises InvalidProxyHeader: If the bytes fed to the parser create an
invalid PROXY header.'

def feed(self, data):

    self.buffer += data
    if ((len(self.buffer) > 107) and (self.NEWLINE not in self.buffer)):
        raise InvalidProxyHeader()
    lines = self.buffer.split(self.NEWLINE, 1)
    if (not (len(lines) > 1)):
        return (None, None)
    self.buffer = ''
    remaining = lines.pop()
    header = lines.pop()
    info = self.parse(header)
    return (info, remaining)
