def makeConnection(self, transport): self._transportPeer = transport.getPeer() self._transportHost = transport.getHost() log.msg( "%s %s connection established (HOST:%s PEER:%s)" % (self.isClient and "client" or "server", self.__class__.__name__, self._transportHost, self._transportPeer)) self._outstandingRequests = {} self._requestBuffer = [] self._sslVerifyProblems = () # ^ Later this will become a mutable list - we can't get the handle # during connection shutdown thanks to the fact that Twisted destroys # the socket on our transport before notifying us of a lost connection # (which I guess is reasonable - the socket is dead by then) See a few # lines below in startTLS for details. --glyph LineReceiver.makeConnection(self, transport)
def makeConnection(self, transport): self._transportPeer = transport.getPeer() self._transportHost = transport.getHost() log.msg("%s %s connection established (HOST:%s PEER:%s)" % (self.isClient and "client" or "server", self.__class__.__name__, self._transportHost, self._transportPeer)) self._outstandingRequests = {} self._requestBuffer = [] self._sslVerifyProblems = () # ^ Later this will become a mutable list - we can't get the handle # during connection shutdown thanks to the fact that Twisted destroys # the socket on our transport before notifying us of a lost connection # (which I guess is reasonable - the socket is dead by then) See a few # lines below in startTLS for details. --glyph LineReceiver.makeConnection(self, transport)
def dataReceived(self, data): # If we successfully receive any data after TLS has been started, that # means the connection was secured properly. Make a note of that fact. if self._justStartedTLS: self._justStartedTLS = False return LineReceiver.dataReceived(self, data)