twisted如何从protocol中获得ip地址

def connectionMade(self):

    ip=self.transport.getPeer().host

 

self.transport.loseConnection()

posted on 2011-11-23 18:24  真阿当  阅读(212)  评论(0编辑  收藏  举报