twisted如何从protocol中获得ip地址

def connectionMade(self):

    ip=self.transport.getPeer().host

self.transport.loseConnection()

原文地址:https://www.cnblogs.com/cly84920/p/4426565.html