Logo Search packages:      
Sourcecode: tcpwatch-httpproxy version File versions  Download package

def tcpwatch::HTTPProxyToClientConnection::received (   self,
  data 
)

Accepts data received from the client.

Reimplemented from tcpwatch::ForwardingEndpoint.

Definition at line 1143 of file tcpwatch.py.

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):


Generated by  Doxygen 1.6.0   Back to index