コード例 #1
0
    def lineReceived(self, line):
       # Pass through end of header
       if not line:
           QueryProtocol.lineReceived(self, line)
           return

       # seperate with any single valid EOL combination.
       # '\n\n' becomes ['','']
       lines = line.splitlines()

       # Pass one at a time until we pass the header
       while self.line_mode and len(lines):
           line = lines.pop(0)
           QueryProtocol.lineReceived(self, line)

       # Any remaining lines are really part of the body
       # join with arbitrary EOL since XML parser should
       # be able to handle it.
       if len(lines):
           self.rawDataReceived('\n\r'.join(lines))
コード例 #2
0
 def handleResponseEnd(self):
     QueryProtocol.handleResponseEnd(self)
     self.setTimeout(None)
     self.transport.loseConnection()
コード例 #3
0
 def connectionLost(self, reason):
     self.setTimeout(None)
     QueryProtocol.connectionLost(self, reason)
コード例 #4
0
 def connectionMade(self):
     QueryProtocol.connectionMade(self)
     if self.factory.rpc_timeout:
         self.setTimeout(self.factory.rpc_timeout.get())
コード例 #5
0
ファイル: repeatingproxy.py プロジェクト: beaker-project/beah
 def handleResponseEnd(self):
     QueryProtocol.handleResponseEnd(self)
     self.setTimeout(None)
     self.transport.loseConnection()
コード例 #6
0
ファイル: repeatingproxy.py プロジェクト: beaker-project/beah
 def connectionLost(self, reason):
     self.setTimeout(None)
     QueryProtocol.connectionLost(self, reason)
コード例 #7
0
ファイル: repeatingproxy.py プロジェクト: beaker-project/beah
 def connectionMade(self):
     QueryProtocol.connectionMade(self)
     if self.factory.rpc_timeout:
         self.setTimeout(self.factory.rpc_timeout.get())