Accepts data received from the client.
Reimplemented from tcpwatch::ForwardingEndpoint.
01143 : """Accepts data received from the client.""" while data: parser = self._req_parser if parser is None: # Begin another request. self._newRequest() parser = self._req_parser if not parser.completed: # Waiting for a complete request. consumed = parser.received(data) ForwardingEndpoint.received(self, data[:consumed]) data = data[consumed:] if parser.completed: # Connect to a server. self.openProxyConnection(parser) # Expect a new request or a closed connection. self._req_parser = None def openProxyConnection(self, request):